mirror of https://github.com/zcash/halo2.git
Merge pull request #239 from nuttycom/di_from_bytes
Add construction of DiversifierIndex directly from bytes.
This commit is contained in:
commit
68b790c7da
|
@ -422,6 +422,12 @@ di_from!(u32);
|
|||
di_from!(u64);
|
||||
di_from!(usize);
|
||||
|
||||
impl From<[u8; 11]> for DiversifierIndex {
|
||||
fn from(j_bytes: [u8; 11]) -> Self {
|
||||
DiversifierIndex(j_bytes)
|
||||
}
|
||||
}
|
||||
|
||||
impl DiversifierKey {
|
||||
/// Returns the diversifier at index 0.
|
||||
pub fn default_diversifier(&self) -> Diversifier {
|
||||
|
|
Loading…
Reference in New Issue