Skip to content

Commit f0157b9

Browse files
rename to digest
1 parent 38e32ea commit f0157b9

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

native/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ edition = "2018"
77
# cause vendored libraries to fail compilation due
88
# to dependency on protoc compiler
99
# if you need to compile .proto files, use this line:
10-
build = "build.rs"
11-
#build = false
10+
#build = "build.rs"
11+
build = false
1212

1313
[dependencies]
1414
chacha20poly1305 = "0.7.0"

native/src/hashing/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ impl crate::Hashing {
99
// Hash the provided data
1010
let hash1 = blake3::hash(data.as_slice());
1111
Ok(Blake3HashResponse {
12-
output: hash1.as_bytes().to_vec(),
12+
digest: hash1.as_bytes().to_vec(),
1313
})
1414
}
1515

@@ -21,7 +21,7 @@ impl crate::Hashing {
2121
// Hash the provided data
2222
let hash1 = blake3::keyed_hash(key_slice, data.as_slice());
2323
Ok(Blake3KeyedHashResponse {
24-
output: hash1.as_bytes().to_vec(),
24+
digest: hash1.as_bytes().to_vec(),
2525
})
2626
}
2727

@@ -31,7 +31,7 @@ impl crate::Hashing {
3131
// Hash the provided data
3232
let hash1 = blake3::derive_key(str::from_utf8(context.as_slice()).unwrap(), key_material.as_slice());
3333
Ok(Blake3DeriveKeyResponse {
34-
output: hash1.to_vec(),
34+
digest: hash1.to_vec(),
3535
})
3636
}
3737
}
@@ -48,7 +48,7 @@ mod test {
4848
let request = Blake3HashRequest{data: data.as_bytes().to_vec() };
4949
let response = Hashing::blake3_hash(&request).unwrap();
5050
let hash_data = blake3::hash(data.as_bytes());
51-
assert_eq!(response.output.as_slice(), hash_data.as_bytes())
51+
assert_eq!(response.digest.as_slice(), hash_data.as_bytes())
5252
}
5353

5454
#[test]
@@ -58,7 +58,7 @@ mod test {
5858
let request = Blake3KeyedHashRequest{data: data.as_bytes().to_vec(), key: key_str.as_bytes().to_vec() };
5959
let response = Hashing::blake3_keyed_hash(&request).unwrap();
6060
let hash_data = blake3::keyed_hash(<&[u8; 32]>::try_from(key_str.as_bytes()).unwrap(), data.as_bytes());
61-
assert_eq!(response.output.as_slice(), hash_data.as_bytes())
61+
assert_eq!(response.digest.as_slice(), hash_data.as_bytes())
6262
}
6363

6464
#[test]
@@ -76,6 +76,6 @@ mod test {
7676
let request = Blake3DeriveKeyRequest{context: context.as_bytes().to_vec(), key_material: data.as_bytes().to_vec()};
7777
let response = Hashing::blake3_derive_key(&request).unwrap();
7878
let hash_data = blake3::derive_key(&*context, data.as_bytes());
79-
assert_eq!(response.output.as_slice(), hash_data)
79+
assert_eq!(response.digest.as_slice(), hash_data)
8080
}
8181
}

native/src/proto/okapi/okapi_hashing.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub struct Blake3HashRequest {
88
#[derive(Clone, PartialEq, ::prost::Message)]
99
pub struct Blake3HashResponse {
1010
#[prost(bytes="vec", tag="1")]
11-
pub output: ::prost::alloc::vec::Vec<u8>,
11+
pub digest: ::prost::alloc::vec::Vec<u8>,
1212
}
1313
#[derive(::serde::Serialize, ::serde::Deserialize)]
1414
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -22,7 +22,7 @@ pub struct Blake3KeyedHashRequest {
2222
#[derive(Clone, PartialEq, ::prost::Message)]
2323
pub struct Blake3KeyedHashResponse {
2424
#[prost(bytes="vec", tag="1")]
25-
pub output: ::prost::alloc::vec::Vec<u8>,
25+
pub digest: ::prost::alloc::vec::Vec<u8>,
2626
}
2727
#[derive(::serde::Serialize, ::serde::Deserialize)]
2828
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -36,5 +36,5 @@ pub struct Blake3DeriveKeyRequest {
3636
#[derive(Clone, PartialEq, ::prost::Message)]
3737
pub struct Blake3DeriveKeyResponse {
3838
#[prost(bytes="vec", tag="1")]
39-
pub output: ::prost::alloc::vec::Vec<u8>,
39+
pub digest: ::prost::alloc::vec::Vec<u8>,
4040
}

proto/okapi/hashing/v1/hashing.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ message Blake3HashRequest {
1212
}
1313

1414
message Blake3HashResponse {
15-
bytes output = 1;
15+
bytes digest = 1;
1616
}
1717

1818
message Blake3KeyedHashRequest {
@@ -21,7 +21,7 @@ message Blake3KeyedHashRequest {
2121
}
2222

2323
message Blake3KeyedHashResponse {
24-
bytes output = 1;
24+
bytes digest = 1;
2525
}
2626

2727
message Blake3DeriveKeyRequest {
@@ -30,5 +30,5 @@ message Blake3DeriveKeyRequest {
3030
}
3131

3232
message Blake3DeriveKeyResponse {
33-
bytes output = 1;
33+
bytes digest = 1;
3434
}

0 commit comments

Comments
 (0)