Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 666542
Collapse All | Expand All

(-)beecrypt-4.2.1-r4/c++/beeyond/DHIESParameterSpec.cxx (-4 / +4 lines)
Lines 68-83 Link Here
68
68
69
DHIESParameterSpec::DHIESParameterSpec(const String& descriptor) throw (IllegalArgumentException)
69
DHIESParameterSpec::DHIESParameterSpec(const String& descriptor) throw (IllegalArgumentException)
70
{
70
{
71
	UnicodeString match(descriptor.toUnicodeString());
71
	icu::UnicodeString match(descriptor.toUnicodeString());
72
72
73
	UErrorCode status = U_ZERO_ERROR;
73
	UErrorCode status = U_ZERO_ERROR;
74
	UParseError error;
74
	UParseError error;
75
75
76
	auto_ptr<RegexPattern> p(RegexPattern::compile("DHIES\\((\\w(?:\\w|\\d)*(?:-(?:\\w|\\d)*)*),(\\w(?:\\w|\\d)*(?:-(?:\\w|\\d)*)*),(\\w(?:\\w|\\d)*(?:-(?:\\w|\\d)*)*)(?:,(\\d+))?(?:,(\\d+))?\\)", error, status));
76
	auto_ptr<icu::RegexPattern> p(icu::RegexPattern::compile("DHIES\\((\\w(?:\\w|\\d)*(?:-(?:\\w|\\d)*)*),(\\w(?:\\w|\\d)*(?:-(?:\\w|\\d)*)*),(\\w(?:\\w|\\d)*(?:-(?:\\w|\\d)*)*)(?:,(\\d+))?(?:,(\\d+))?\\)", error, status));
77
	if (U_FAILURE(status))
77
	if (U_FAILURE(status))
78
		throw RuntimeException("RegexPattern doesn't compile");
78
		throw RuntimeException("ICU RegexPattern doesn't compile");
79
79
80
	auto_ptr<RegexMatcher> m(p->matcher(match, status));
80
	auto_ptr<icu::RegexMatcher> m(p->matcher(match, status));
81
	if (!m->matches(status))
81
	if (!m->matches(status))
82
		throw IllegalArgumentException("couldn't parse descriptor into DHIES(<digest>,<cipher>,<mac>[,<cipherkeylen>[,<mackeylen>]])");
82
		throw IllegalArgumentException("couldn't parse descriptor into DHIES(<digest>,<cipher>,<mac>[,<cipherkeylen>[,<mackeylen>]])");
83
83
(-)beecrypt-4.2.1-r4/c++/crypto/Cipher.cxx (-8 / +8 lines)
Lines 32-38 Link Here
32
using namespace beecrypt::crypto;
32
using namespace beecrypt::crypto;
33
33
34
namespace {
34
namespace {
35
	RegexPattern* _amppat = 0;
35
	icu::RegexPattern* _amppat = 0;
36
}
36
}
37
37
38
const int Cipher::ENCRYPT_MODE = 1;
38
const int Cipher::ENCRYPT_MODE = 1;
Lines 55-61 Link Here
55
55
56
Cipher* Cipher::getInstance(const String& transformation) throw (NoSuchAlgorithmException, NoSuchPaddingException)
56
Cipher* Cipher::getInstance(const String& transformation) throw (NoSuchAlgorithmException, NoSuchPaddingException)
57
{
57
{
58
	UnicodeString match(transformation.toUnicodeString());
58
	icu::UnicodeString match(transformation.toUnicodeString());
59
59
60
	UErrorCode status = U_ZERO_ERROR;
60
	UErrorCode status = U_ZERO_ERROR;
61
61
Lines 63-76 Link Here
63
	{
63
	{
64
		UParseError error;
64
		UParseError error;
65
65
66
		_amppat = RegexPattern::compile("(\\w+)(?:/(\\w*))?(?:/(\\w+))?", error, status);
66
		_amppat = icu::RegexPattern::compile("(\\w+)(?:/(\\w*))?(?:/(\\w+))?", error, status);
67
		// shouldn't happen
67
		// shouldn't happen
68
		if (U_FAILURE(status))
68
		if (U_FAILURE(status))
69
			throw RuntimeException("ICU regex compilation problem");
69
			throw RuntimeException("ICU regex compilation problem");
70
	}
70
	}
71
71
72
	status = U_ZERO_ERROR;
72
	status = U_ZERO_ERROR;
73
	RegexMatcher *m = _amppat->matcher(match, status);
73
	icu::RegexMatcher *m = _amppat->matcher(match, status);
74
74
75
	status = U_ZERO_ERROR;
75
	status = U_ZERO_ERROR;
76
	if (m->matches(status))
76
	if (m->matches(status))
Lines 225-237 Link Here
225
	{
225
	{
226
		UParseError error;
226
		UParseError error;
227
227
228
		_amppat = RegexPattern::compile("(\\w+)(?:/(\\w*))?(?:/(\\w+))?", error, status);
228
		_amppat = icu::RegexPattern::compile("(\\w+)(?:/(\\w*))?(?:/(\\w+))?", error, status);
229
		// shouldn't happen
229
		// shouldn't happen
230
		if (U_FAILURE(status))
230
		if (U_FAILURE(status))
231
			throw RuntimeException("ICU regex compilation problem");
231
			throw RuntimeException("ICU regex compilation problem");
232
	}
232
	}
233
233
234
	RegexMatcher *m = _amppat->matcher(transformation.toUnicodeString(), status);
234
	icu::RegexMatcher *m = _amppat->matcher(transformation.toUnicodeString(), status);
235
235
236
	if (m->matches(status))
236
	if (m->matches(status))
237
	{
237
	{
Lines 382-394 Link Here
382
	{
382
	{
383
		UParseError error;
383
		UParseError error;
384
384
385
		_amppat = RegexPattern::compile("(\\w+)(?:/(\\w*))?(?:/(\\w+))?", error, status);
385
		_amppat = icu::RegexPattern::compile("(\\w+)(?:/(\\w*))?(?:/(\\w+))?", error, status);
386
		// shouldn't happen
386
		// shouldn't happen
387
		if (U_FAILURE(status))
387
		if (U_FAILURE(status))
388
			throw RuntimeException("ICU regex compilation problem");
388
			throw RuntimeException("ICU regex compilation problem");
389
	}
389
	}
390
390
391
	RegexMatcher *m = _amppat->matcher(transformation.toUnicodeString(), status);
391
	icu::RegexMatcher *m = _amppat->matcher(transformation.toUnicodeString(), status);
392
392
393
	if (m->matches(status))
393
	if (m->matches(status))
394
	{
394
	{
(-)beecrypt-4.2.1-r4/c++/lang/Integer.cxx (-2 / +2 lines)
Lines 76-86 Link Here
76
{
76
{
77
	UErrorCode status = U_ZERO_ERROR;
77
	UErrorCode status = U_ZERO_ERROR;
78
78
79
	NumberFormat* nf = NumberFormat::createInstance(status);
79
	icu::NumberFormat* nf = icu::NumberFormat::createInstance(status);
80
80
81
	if (nf)
81
	if (nf)
82
	{
82
	{
83
		Formattable fmt((int32_t) 0);
83
		icu::Formattable fmt((int32_t) 0);
84
84
85
		nf->parse(s.toUnicodeString(), fmt, status);
85
		nf->parse(s.toUnicodeString(), fmt, status);
86
86
(-)beecrypt-4.2.1-r4/c++/lang/Long.cxx (-2 / +2 lines)
Lines 88-98 Link Here
88
{
88
{
89
	UErrorCode status = U_ZERO_ERROR;
89
	UErrorCode status = U_ZERO_ERROR;
90
90
91
	NumberFormat* nf = NumberFormat::createInstance(status);
91
	icu::NumberFormat* nf = icu::NumberFormat::createInstance(status);
92
92
93
	if (nf)
93
	if (nf)
94
	{
94
	{
95
		Formattable fmt((int64_t) 0);
95
		icu::Formattable fmt((int64_t) 0);
96
96
97
		nf->parse(s.toUnicodeString(), fmt, status);
97
		nf->parse(s.toUnicodeString(), fmt, status);
98
98
(-)beecrypt-4.2.1-r4/c++/lang/String.cxx (-4 / +4 lines)
Lines 87-93 Link Here
87
	assert(_value.size() <= Integer::MAX_VALUE);
87
	assert(_value.size() <= Integer::MAX_VALUE);
88
}
88
}
89
89
90
String::String(const UnicodeString& copy) : _value((int) copy.length())
90
String::String(const icu::UnicodeString& copy) : _value((int) copy.length())
91
{
91
{
92
	assert(_value.size() <= Integer::MAX_VALUE);
92
	assert(_value.size() <= Integer::MAX_VALUE);
93
93
Lines 103-109 Link Here
103
	return *this;
103
	return *this;
104
}
104
}
105
105
106
String& String::operator=(const UnicodeString& copy)
106
String& String::operator=(const icu::UnicodeString& copy)
107
{
107
{
108
	assert(copy.length() <= Integer::MAX_VALUE);
108
	assert(copy.length() <= Integer::MAX_VALUE);
109
109
Lines 397-405 Link Here
397
	return *this;
397
	return *this;
398
}
398
}
399
399
400
UnicodeString String::toUnicodeString() const throw ()
400
icu::UnicodeString String::toUnicodeString() const throw ()
401
{
401
{
402
	return UnicodeString(_value.data(), (int32_t) _value.size());
402
	return icu::UnicodeString(_value.data(), (int32_t) _value.size());
403
}
403
}
404
404
405
String String::valueOf(bool b)
405
String String::valueOf(bool b)
(-)beecrypt-4.2.1-r4/c++/util/Date.cxx (-4 / +4 lines)
Lines 29-37 Link Here
29
29
30
namespace {
30
namespace {
31
	#if WIN32
31
	#if WIN32
32
	__declspec(thread) DateFormat* format = 0;
32
	__declspec(thread) icu::DateFormat* format = 0;
33
	#else
33
	#else
34
	__thread DateFormat* format = 0;
34
	__thread icu::DateFormat* format = 0;
35
	#endif
35
	#endif
36
}
36
}
37
37
Lines 112-120 Link Here
112
	String result;
112
	String result;
113
113
114
	if (!format)
114
	if (!format)
115
		format = DateFormat::createDateTimeInstance();
115
		format = icu::DateFormat::createDateTimeInstance();
116
116
117
	UnicodeString tmp;
117
	icu::UnicodeString tmp;
118
118
119
	result = format->format((UDate) _time, tmp);
119
	result = format->format((UDate) _time, tmp);
120
120
(-)beecrypt-4.2.1-r4/include/beecrypt/c++/lang/String.h (-3 / +3 lines)
Lines 73-83 Link Here
73
			String(const bytearray&);
73
			String(const bytearray&);
74
			String(const array<jchar>&);
74
			String(const array<jchar>&);
75
			String(const String& copy);
75
			String(const String& copy);
76
			String(const UnicodeString& copy);
76
			String(const icu::UnicodeString& copy);
77
			virtual ~String() {}
77
			virtual ~String() {}
78
78
79
			String& operator=(const String& copy);
79
			String& operator=(const String& copy);
80
			String& operator=(const UnicodeString& copy);
80
			String& operator=(const icu::UnicodeString& copy);
81
81
82
			virtual jchar charAt(jint index) const throw (IndexOutOfBoundsException);
82
			virtual jchar charAt(jint index) const throw (IndexOutOfBoundsException);
83
			virtual jint compareTo(const String& str) const throw ();
83
			virtual jint compareTo(const String& str) const throw ();
Lines 101-107 Link Here
101
			String toUpperCase() const throw ();
101
			String toUpperCase() const throw ();
102
			const array<jchar>& toCharArray() const throw ();
102
			const array<jchar>& toCharArray() const throw ();
103
			virtual String toString() const throw ();
103
			virtual String toString() const throw ();
104
			UnicodeString toUnicodeString() const throw ();
104
			icu::UnicodeString toUnicodeString() const throw ();
105
		};
105
		};
106
106
107
		BEECRYPTCXXAPI
107
		BEECRYPTCXXAPI

Return to bug 666542