This is an automated email from the ASF dual-hosted git repository.
yuanz pushed a commit to branch no-std
in repository
https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git
The following commit(s) were added to refs/heads/no-std by this push:
new 71f3b82 objects.rs: fix typos in comments
71f3b82 is described below
commit 71f3b82da3776e51558046198fbd9baed116bd7f
Author: Sean Gilligan <[email protected]>
AuthorDate: Mon May 20 16:38:55 2024 -0700
objects.rs: fix typos in comments
Signed-off-by: Sean Gilligan <[email protected]>
---
optee-utee/src/object.rs | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/optee-utee/src/object.rs b/optee-utee/src/object.rs
index b98539f..bd1432e 100644
--- a/optee-utee/src/object.rs
+++ b/optee-utee/src/object.rs
@@ -25,7 +25,7 @@ use alloc::boxed::Box;
use alloc::vec::Vec;
/// A general attribute (buffer or value) that can be used to populate an
object or to specify
-/// opeation parameters.
+/// operation parameters.
pub struct Attribute {
raw: raw::TEE_Attribute,
}
@@ -132,7 +132,7 @@ impl AttributeValue {
/// # Parameters
///
/// 1) `id`: The AttributeId[AttributeId] is an identifier of the
attribute to populate.
- /// 2) `a`, `b`: u32 values to assign to the members of the a value
attribute.
+ /// 2) `a`, `b`: u32 values to assign to the members of the value
attribute.
///
/// # Example
///
@@ -159,7 +159,7 @@ pub struct ObjectInfo {
// Since raw struct is not implemented Copy attribute yet, every item in raw
struct needs a function to extract.
impl ObjectInfo {
- /// Return an [ObjectInfo](ObjectInfo) struct based on the raw structrure
`TEE_ObjectInfo`.
+ /// Return an [ObjectInfo](ObjectInfo) struct based on the raw structure
`TEE_ObjectInfo`.
/// The raw structure contains following fields:
///
/// 1) `objectType`: The parameter represents one of the
@@ -183,12 +183,12 @@ impl ObjectInfo {
Self { raw }
}
- /// Return the `dataSize` field of the raw structrure `TEE_ObjectInfo`.
+ /// Return the `dataSize` field of the raw structure `TEE_ObjectInfo`.
pub fn data_size(&self) -> usize {
self.raw.dataSize as usize
}
- /// Return the `objectSize` field of the raw structrure `TEE_ObjectInfo`.
+ /// Return the `objectSize` field of the raw structure `TEE_ObjectInfo`.
pub fn object_size(&self) -> usize {
self.raw.objectSize as usize
}
@@ -316,13 +316,13 @@ bitflags! {
pub struct UsageFlag: u32 {
/// The object [Attribute](Attribute) can be extracted.
const EXTRACTABLE = 0x00000001;
- /// The object can be used for encrytpion.
+ /// The object can be used for encryption.
const ENCRYPT = 0x00000002;
- /// The object can be used for decrption.
+ /// The object can be used for decryption.
const DECRYPT = 0x00000004;
/// The object can be used for mac operation.
const MAC = 0x00000008;
- /// The ojbect can be used for signature.
+ /// The object can be used for signature.
const SIGN = 0x00000010;
/// The object can be used for verification of a signature.
const VERIFY = 0x00000020;
@@ -391,7 +391,7 @@ pub enum AttributeId {
DsaPrivateValue = 0xC0000231,
/// Diffie-Hellman prime number: `p`
DhPrime = 0xD0001032,
- /// Diffie-Hellman sub prime number: `q`
+ /// Diffie-Hellman subprime number: `q`
DhSubprime = 0xD0001132,
/// Diffie-Hellman base: `g`
DhBase = 0xD0001232,
@@ -445,7 +445,7 @@ pub enum TransientObjectType {
HmacSha384 = 0xA0000005,
/// Between 256 and 1024 bits, multiple of 8 bits
HmacSha512 = 0xA0000006,
- /// The number of bits in the modulus. 256, 512, 768, 1024, 1536 and 2048
bit keys SHALL be supported.
+ /// The number of bits in the modulus. 256, 512, 768, 1024, 1536 and
2048-bit keys SHALL be supported.
/// Support for other key sizes including bigger key sizes is
/// implementation-dependent. Minimum key size is 256 bits
RsaPublicKey = 0xA0000030,
@@ -498,7 +498,7 @@ pub enum TransientObjectType {
Data = 0xA00000BF,
}
-/// A trait for an object (trasient or persistent) to return its handle.
+/// A trait for an object (transient or persistent) to return its handle.
pub trait ObjHandle {
/// Return the handle of an object.
fn handle(&self) -> raw::TEE_ObjectHandle;
@@ -653,7 +653,7 @@ impl TransientObject {
///
/// # Parameters
///
- /// 1) `obj_usage`: New object usage, an OR comination of one or more of
the [UsageFlag](UsageFlag).
+ /// 1) `obj_usage`: New object usage, an OR combination of one or more of
the [UsageFlag](UsageFlag).
///
/// # Example
///
@@ -783,7 +783,7 @@ impl TransientObject {
///
/// # Errors
///
- /// 1) `CorruptObject`: If the persistentd` object is corrupt. The object
handle is closed.
+ /// 1) `CorruptObject`: If the persistent` object is corrupt. The object
handle is closed.
/// 2) `StorageNotAvailable`: If the [PersistentObject](PersistentObject)
is stored in a storage area which is
/// currently inaccessible.
///
@@ -887,7 +887,7 @@ impl PersistentObject {
///
/// # Parameters
///
- /// 1) `storage_id`: The storaget to use which is defined in
+ /// 1) `storage_id`: The storage to use which is defined in
/// [ObjectStorageConstants](ObjectStorageConstants).
/// 2) `object_id`: The object identifier. Note that this buffer cannot
reside in shared memory.
/// 3) `flags`: The [DataFlag](DataFlag) which determine the settings
under which the object is opened.
@@ -957,7 +957,7 @@ impl PersistentObject {
///
/// # Parameters
///
- /// 1) `storage_id`: The storaget to use which is defined in
+ /// 1) `storage_id`: The storage to use which is defined in
/// [ObjectStorageConstants](ObjectStorageConstants).
/// 2) `object_id`: The object identifier. Note that this buffer cannot
reside in shared memory.
/// 3) `flags`: The [DataFlag](DataFlag) which determine the settings
under which the object is opened.
@@ -1181,7 +1181,7 @@ impl PersistentObject {
self.0.value_attribute(id)
}
- /// Read requested size from the data stream assoicate with the object
into the buffer.
+ /// Read requested size from the data stream associate with the object
into the buffer.
///
/// # Parameters
///
@@ -1231,7 +1231,7 @@ impl PersistentObject {
}
}
- /// Write the passed in buffer data into from the data stream assoicate
with the object.
+ /// Write the passed in buffer data into from the data stream associate
with the object.
///
/// # Parameters
///
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]