SecreC 2 language  2.8.0 (2023.09)
Language and standard library reference
Functions

Functions

template<domain D :shared3p >
D xor_uint8 bl_str (string s, uint n)
 
template<domain D :shared3p >
D xor_uint8 bl_str (string s)
 

Detailed Description

Convert a string to a vector of type xor_uint8.

Note
D - shared3p protection domain
Supported types - xor_uint8

Function Documentation

◆ bl_str() [1/2]

D xor_uint8 bl_str ( string  s)
Parameters
s- a string
Returns
returns a bounded length XOR shared string from the public string
Note
the bounded length aligns with the actual length, no extra zeroed bytes are added

◆ bl_str() [2/2]

D xor_uint8 bl_str ( string  s,
uint  n 
)
Returns
returns a bounded length XOR shared string from the public string and the given bound
Parameters
n- an uint type bound
s- a string
Precondition
the size of the given bound is no less than the length of the input string
Postcondition
the output string is of length n
Note
the excess bytes in the shared string are placed in the end and are zeroed