aboutsummaryrefslogtreecommitdiff
path: root/MathFunctions_fp.h
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2015-06-05 12:57:27 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-06-06 00:06:56 +0000
commitf788ffb5e5b4493cb4c1deaa12a97c80c2694b01 (patch)
tree452e5eac43a20a60bc6b822dd810ea0c66165409 /MathFunctions_fp.h
parent99e88835efdddfb4e01ebfe07f668379d64dda64 (diff)
downloadtpm2-f788ffb5e5b4493cb4c1deaa12a97c80c2694b01.tar.gz
reformat added files
This patch is the result of running the following script inside chroot: $ for f in $(git diff bfc1e79 | grep -A1 '^\-\-\- /dev/null' | \ grep '^\+\+' awk -F/ '{print $2}'); do # for all added files rm -f /tmp/clf.h # remove the placeholder file mcomms $f > /tmp/clf.h # a hepler script putting multiline comments in one line rm -f $f clang-format --style=Google /tmp/clf.h > $f done BUG=none TEST=verified that make still succeeds and that $ objdump -d build/tpm2lib | md5sum returns the same value before and after this patch Change-Id: I7e2dca6a1fdd1d77b1c77f3b6cdd3433556d9c1d Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/275681 Reviewed-by: Utkarsh Sanghi <usanghi@chromium.org>
Diffstat (limited to 'MathFunctions_fp.h')
-rw-r--r--MathFunctions_fp.h75
1 files changed, 34 insertions, 41 deletions
diff --git a/MathFunctions_fp.h b/MathFunctions_fp.h
index c83fdfa..0e82ba5 100644
--- a/MathFunctions_fp.h
+++ b/MathFunctions_fp.h
@@ -7,47 +7,40 @@
#ifndef __TPM2_MATHFUNCTIONS_FP_H
#define __TPM2_MATHFUNCTIONS_FP_H
-LIB_EXPORT int _math__Comp(
- const UINT32 aSize, // IN: size of a
- const BYTE *a, // IN: a buffer
- const UINT32 bSize, // IN: size of b
- const BYTE *b // IN: b buffer
- );
-LIB_EXPORT CRYPT_RESULT _math__Div(
- const TPM2B *n, // IN: numerator
- const TPM2B *d, // IN: denominator
- TPM2B *q, // OUT: quotient
- TPM2B *r // OUT: remainder
+LIB_EXPORT int _math__Comp(const UINT32 aSize, // IN: size of a
+ const BYTE *a, // IN: a buffer
+ const UINT32 bSize, // IN: size of b
+ const BYTE *b // IN: b buffer
+ );
+LIB_EXPORT CRYPT_RESULT _math__Div(const TPM2B *n, // IN: numerator
+ const TPM2B *d, // IN: denominator
+ TPM2B *q, // OUT: quotient
+ TPM2B *r // OUT: remainder
);
-LIB_EXPORT BOOL _math__IsPrime(
- const UINT32 prime
-);
-LIB_EXPORT CRYPT_RESULT _math__ModExp(
- UINT32 cSize, // IN: size of the result
- BYTE *c, // OUT: results buffer
- const UINT32 mSize, // IN: size of number to be exponentiated
- const BYTE *m, // IN: number to be exponentiated
- const UINT32 eSize, // IN: size of power
- const BYTE *e, // IN: power
- const UINT32 nSize, // IN: modulus size
- const BYTE *n // IN: modulu
-);
-LIB_EXPORT UINT16 _math__Normalize2B(
- TPM2B *b // IN/OUT: number to normalize
-);
-LIB_EXPORT int _math__sub(
- const UINT32 aSize, // IN: size of a
- const BYTE *a, // IN: a
- const UINT32 bSize, // IN: size of b
- const BYTE *b, // IN: b
- UINT16 *cSize, // OUT: set to MAX(aSize, bSize)
- BYTE *c // OUT: the difference
-);
-LIB_EXPORT int _math__uComp(
- const UINT32 aSize, // IN: size of a
- const BYTE *a, // IN: a
- const UINT32 bSize, // IN: size of b
- const BYTE *b // IN: b
+LIB_EXPORT BOOL _math__IsPrime(const UINT32 prime);
+LIB_EXPORT CRYPT_RESULT
+_math__ModExp(UINT32 cSize, // IN: size of the result
+ BYTE *c, // OUT: results buffer
+ const UINT32 mSize, // IN: size of number to be exponentiated
+ const BYTE *m, // IN: number to be exponentiated
+ const UINT32 eSize, // IN: size of power
+ const BYTE *e, // IN: power
+ const UINT32 nSize, // IN: modulus size
+ const BYTE *n // IN: modulu
+ );
+LIB_EXPORT UINT16 _math__Normalize2B(TPM2B *b // IN/OUT: number to normalize
+ );
+LIB_EXPORT int _math__sub(const UINT32 aSize, // IN: size of a
+ const BYTE *a, // IN: a
+ const UINT32 bSize, // IN: size of b
+ const BYTE *b, // IN: b
+ UINT16 *cSize, // OUT: set to MAX(aSize, bSize)
+ BYTE *c // OUT: the difference
+ );
+LIB_EXPORT int _math__uComp(const UINT32 aSize, // IN: size of a
+ const BYTE *a, // IN: a
+ const UINT32 bSize, // IN: size of b
+ const BYTE *b // IN: b
);
-#endif // __TPM2_MATHFUNCTIONS_FP_H
+#endif // __TPM2_MATHFUNCTIONS_FP_H