Didn't we talk about this a lot and settle on this to imitate the look of standard revisions?
so... Yeah, it all needs to be (documented and) re-evaluated at some point.
I still think the proposed solution (automatic edit summaries) is a good idea.
So it turns out @matthiasmullie implemented the automatic edit summaries ("Created new topic", "Edited a post"), but it doesn't currently apply to Special:Contributions.
• Mattflaschen-WMF renamed this task from Add more details to Flow's entries in Special:Contributions to Add more details to Flow's entries in Special:Contributions (and RecentChanges?).
• Mattflaschen-WMF added a subscriber: Eloquence.
@Mattflaschen Note that T94962 does not describe exactly the same thing, even if we make the descriptions more helpful, the actual link should point to a page that highlights what's new (similar to the links from the notifications panel); especially in a large topic it's otherwise not very useful to understand what's going on.
@Eloquence, I think there is always a link to the post, but it's in the timestamp, which is weird. Also, there's no automatic edit summary for replies.
@Quiddity is probably right that we need to re-evaluate this again.
Well, I think the links are part of the details of the entry (it doesn't make much sense to spec out the text without speccing out the links). But if you want, I can re-open the other one.
Oh wow, that timestamp link is totally obscure -- but not what I mean either, because it's a permalink to only that part of the topic. What I mean is a link to the whole topic, but with the new comment highlighted (and possibly with the viewport scrolled to the new comment).
No need to reopen the other one, just noting it here for the record so we consider the whole experience.


Three piece set, cover-up, vest top and Trousers.
Long cover-up, long sleeves, wrap over with waterfall front in polyester chiffon with animal skin print in truffle beige.
Long vest top with deep boat neck, also in polyester chiffon with animal skin print in truffle beige lined in beige chiffon.
Trouser, tapered leg, elasticated waist, in a double layer of truffle polyester chiffon.


AppProtector is a perfect locking application for your phone which helps your private applications like gallery, messages, contacts, emails, private notes & data and many more to be protected from others. Once Locked, these applications can be accessed only upon entering a valid user defined password. Also it supports master lock which helps you to lock main screen of your phone, thus nobody can use your phone without knowing valid password. More user friendly and easy to use security app.
I havent tried it yet. Just got a phone 2 days ago. Does it keep magic jack people out from messing with you?
i downloaded this app today and both the password and my friends name are wrong pls help me i can not access my app anymore.what should i do.


Arturo Fuente is among the most revered makers of premium cigars in the world. The legendary Fuente family has blended and crafted the brand's award-winning portfolio in the Dominican Republic for generations. Today, Carlito Fuente continues traditions set in place by his father, Carlos Fuente Sr., and his grandfather, Arturo Fuente. Iconic cigars like Fuente Fuente Opus X, Arturo Fuente Anejo, and Arturo Fuente Hemingway express the family's unrivaled passion and dedication for premium tobaccos. Explore a world-renowned collection from a brand that boasts countless top scores and 'Top 10' rankings in Cigar Aficionado, including the '#1 Cigar of the Year' for 2017 with the 97-rated Arturo Fuente Don Carlos Eye of the Shark and 94-points in 2018 for Arturo Fuente Hemingway Work of Art.
Arturo Fuente Claro sports a bright green Candela wrapper leaf in a handful of classic Fuente formats. The mellow, tasty blend is handcrafted at the esteemed Fuente factory in the Dominican Republic from a creamy amalgam of aged Dominican tobaccos. The medium-bodied profile boasts easygoing flavors of grass, freshly brewed green tea, and buttered toast. Add a classic Candela to your collection today.
Blended by Carlos Fuente Sr.
Arturo Fuente Don Carlos is a 94-rated masterpiece, handcrafted in the Dominican Republic from a select recipe of the finest aged tobaccos. Fuente family patriarch Carlos Fuente Sr. blended Don Carlos to an intricate standard of premium, vintage Dominican binder and filler tobaccos beneath a glistening Cameroon wrapper leaf. The complex, medium-bodied profile delivers lavish notes of earth and cedar with nuances of oak, espresso beans, and chestnuts. A subtly sweet finish emerges alongside an intoxicating room note. Experience the maximum in sophistication and refinement from a celebrated Dominican-made gem today.
Welcome your new arrival with a tasty, value-priced cigar from the celebrated Arturo Fuente brand. Mellow, approachable flavors of nuts, toast, and cedar deliver a touch of spice everyone can appreciate in the easygoing Arturo Fuente Brevas Royale blend. A Connecticut Shade wrapper embraces a pleasant amalgam of Dominican tobaccos that burn cool and easy and won't break the bank when you're ready to announce the new addition to your family.
The Opus X Lost City is a very rare and well-aged blend comprised entirely of Dominican tobaccos grown on the Fuente family's famous Chateau de la Fuente estate. Rich and oily Dominican wrappers enclose a robust pairing of Dominican binder and filler tobaccos which deliver bold, balanced flavors of leather, cedar and oak with amplified spices and a creamy finish. For fans of Fuente, Opus X Lost City is a special occasion blend with added complexity and an intriguing depth.
If you were just gifted some cigars and you don't have a humidor, or you need extra storage because your humidor is filled to capacity, Arturo Fuente Humidor Bags are the perfect temporary storage solution. The thick plastic lining and sturdy ziplock encloses a Boveda humidification pack guaranteed to last for 6 months. Just tuck your cigars in the bag, zip it shut and store at room temperature. Toss a humidor bag into your suitcase and take some cigars on vacation, or bring home a batch of something special you pick up while you're away! Choose from 3 sizes to fit the right number of cigars for your needs!
The Arturo Fuente brand is globally renowned for producing numerous iconic, top-selling cigars. The brand's origins began more than a century ago with the birth of Arturo Fuente in 1887 in Cuba. Fuente immigrated to the U.S. in the early 1900s, settling first in Key West, Florida. A thriving cigar industry attracted a large contingent of Cuban, Spanish and Italian immigrants to Florida's recently founded Ybor City in pursuit of the American Dream. Fuente would eventually settle in West Tampa, a sister town to Ybor City, as the area quickly became a mecca for those working in the cigar business. By the early 1920s, the burgeoning Arturo Fuente Company employed 500 people handcrafting cigars with Cuban tobacco. Despite the company's early success, tragedy struck in 1924 when Fuente's West Tampa factory was destroyed by a fire. Fuente would spend more than two decades working as a general manager to repay debts on losses sustained as a result of the fire.
In the early 1930s, Fuente married and began a family with Cristina Trujillo. By 1940, Arturo's pursuit of making fine cigars had been reignited as sons Arturo Jr. and Carlos Arturo rolled 50 cigars per day after school in the family's home. Throughout the 1950s, Carlos Arturo Fuente would embrace a critical leadership role within the company. Several risky endeavors, including the unheard-of strategy of selling cigars on credit, paid off and proved essential in building brand awareness. Carlos effectively established distributors in both Miami and Manhattan over the next decade, greatly increasing consumer reach. As Arturo Fuente Sr. approached retirement, Carlos purchased his brother's share of the business for one dollar and solely assumed the company's reigns. Following the acquisition of a two-story building in Ybor City in the 1960s to serve as the brand's factory, Carlos doubled the number of employees to 100 people. As rumors of the Cuban trade embargo swirled, Carlos Fuente keenly purchased a three-year supply of Cuban tobacco, ensuring the brand's survival until new products could be brought to market. Subsequently, 1966 saw the release of Flor de Orlando, the Fuente's first handmade cigar that did not utilize any Cuban tobacco. By this time, the brand's reputation was well-regarded for a high level of quality and craftsmanship. Carlos again expanded operations with the purchase of The Charles the Great Building on 22nd Street in Ybor City to support the brand's growth.
The legendary Flor Fina 8-5-8 cigar was released in 1975 to commemorate the passing of Arturo Fuente at the age of 85 in 1973. As the 1970s unfolded, Carlos Fuente grew tobacco in a handful of Central American regions, including Puerto Rico, Mexico, Honduras and Nicaragua. Chaotic political conditions proved too difficult to maintain operations in a number of areas. The Fuente family would again lose a key cigar factory in Nicaragua as the Sandinistas eroded the nation's stability. It was production at the Ybor City location in Florida that sustained the brand during this period.
Undeterred by recent political and production challenges, Carlos began a new venture in the Dominican Republic. As his son, Carlito, became more involved in the family business, Carlos debuted the first Arturo Fuente Hemingway cigars in the early 1980s. The new product line was originally nicknamed "fancy tails" due to the unique Figurado shape in which the cigars were rolled. Thanks to an article in March of 1984 by Cigar Connoisseur Magazine, the brand was launched into the global spotlight. Demand for cigars from the Dominican Republic flourished in the 1980s, leading to the Fuente family's partnership with the Newman family, under the Fuente Newman umbrella, to increase U.S. distribution. The brand could fundamentally advance a progressive agenda as a result.
A handful of influential factors fueled skyrocketing demand during the Cigar Boom of the 1990s, such as the debut of Cigar Aficionado magazine in conjunction with a prosperous economic landscape. Carlito Fuente would emerge as a creative force under his father's guidance as the Fuente brand achieved an elevated status. Among Carlito's most notable contributions was the development of Fuente Fuente Opus X, the first cigar to utilize a wrapper leaf from the Dominican Republic. Carlito Fuente's persistent experimentation in successfully creating a true Dominican puro revealed the culmination of generations of knowledge in growing, fermenting, and blending tobacco to a pinnacle standard. To this day, the ultra-rare Opus X, is one of the most sought-after cigars ever released.
In the wake of its rich and storied history, the Arturo Fuente brand is responsible for producing some of the most recognizable cigars in the world. The early success of the Arturo Fuente Hemingway line cemented the company's reputation for quality without compromise in the modern U.S. cigar market. Patiently aged wrappers from Cameroon adorn the now legendary and approachable blend of Dominican binder and filler tobaccos in the Hemingway series. Perhaps the most distinguishing characteristic of Hemingway is the figured shape, or Figurado format, in which every cigar is rolled. In uncovering several classic Cuban cigar molds in one of his old warehouses in Florida, Carlos Fuente Sr. made a calculated decision to resurrect the artfully shaped formats with the Hemingway series in the early 1980s, despite the extra skill and training required of rollers to execute the patient design. The top-selling sizes include the Arturo Fuente Hemingway Short Story and the Arturo Fuente Hemingway Signature. The cigar is not only visually striking, but provides a unique concentration of the blend in the elegantly tapered shape. Other well-known variations include the Hemingway Classic, Hemingway Best Seller, Hemingway Masterpiece and Hemingway Work of Art. Due to its phenomenal appeal, the Fuente family later introduced the Hemingway Maduro series, which presents the blend in a dark and lustrous Connecticut Broadleaf wrapper. Available at select retailers, Hemingway Between the Lines marries both a Connecticut and Maduro wrapper in a rare barber-pole cigar in the impressive Figurado shape.
In addition to Hemingway, the Fuente brand portfolio encompasses several other bestselling blends. The original Arturo Fuente line is available in dozens of classic formats with a wealth of wrapper options, including Cameroon, Connecticut, Connecticut Broadleaf, Ecuador and Candela. Quintessential Dominican approachability is conveyed with a remarkable depth of flavor and aroma in mild to medium-bodied profiles that exhibit the brand's unflinching consistency. Arturo Fuente Chateau Fuente is legendary for offering rich and accessible tasting notes of cedar, coffee and nuts in a range of cool-burning, 50 to 54 ring gauges. The Arturo Fuente Chateau series is praised as an excellent value in every wrapper variety, including Natural, Maduro and Sungrown. Arturo Fuente Don Carlos enjoys a monumental audience by offering a slightly stronger version of the Hemingway line in several classic shapes. The finest Cameroon wrappers in the world have made Arturo Fuente Don Carlos a top-selling blend for decades with a sophisticated, medium-bodied profile of sweet spices, chestnuts, coffee and cedar.
Although produced in extremely limited quantities, Fuente Fuente Opus X is coveted by scores of cigar loves for its richness and rarity. Utilizing only the finest premium aged Dominican binder and filler tobaccos, Arturo Fuente Opus X is cloaked in a marvelous Dominican wrapper leaf. Supreme notes of cedar, figs, raisins and spice dominate the cigar's full-bodied profile with an unmistakable signature. Cigar connoisseurs devour the smallest quantities available in both traditional and exotic shapes and sizes, often collecting and saving them for special occasions. In the wake of a damaging hurricane season years ago, several tobacco aging barns were destroyed and the Fuente family lost much of its prized store of Opus X wrapper leaves. Facing a temporary shortage of Opus X cigars, Carlito Fuente released the Arturo Fuente Anejo series in a creative strategy to satisfy the growing audience of Opus X fans. Arturo Fuente Anejo features a stunning and succulent Connecticut Broadleaf wrapper, aged extensively in a cognac barrel, over the classic Opus X binder and filler tobaccos. Although production of Opus X rebounded in subsequent seasons, Fuente Anejo continues to harbor a significant demand in its own right, particularly the prized Arturo Fuente Anejo Shark, a rare box-pressed torpedo shape. The blend is noted for its medium-bodied, decadent profile of dark chocolate, caramels and sweet spices with a distinct cognac note as a result of the wrapper's proprietary fermentation process.
Whether you count yourself as a novice cigar smoker or a veteran connoisseur, the Arturo Fuente brand produces numerous world-renowned blends well worth experiencing. Scores of 90+ ratings, a '#1 Cigar of the Year' title, and a several 'Top 10 Cigars of the Year' selections from Cigar Aficionado highlight the brand's popularity and success. An undeniable reputation for quality, consistency and satisfaction has made the Fuente name an icon among cigar lovers through generations of the Fuente family's hard work, dedication and passion. Taste the ample and legendary talents behind the legacy of Arturo Fuente today.


I cannot really think of many shows that do not feel stale after seven seasons. Usually writers' run out of ideas and provide ludicrous plotlines involving pairing random main cast members together romantically, having a character jump over a shark on water skis or the dreaded over-reliance on celebrity guest stars to shift the focus and try to Houdini the viewer into forgetting that the characters have gotten stale. It's Always Sunny in Philadelphia actually somehow makes itself feel more fresh and funny in its seventh season than many of its earlier episodes without relying on cheap tricks to maintain interest.
It's Always Sunny premiered back in 2005 on FX on an obviously ridiculously low budget. It's Always Sunny centers around five soulless, crude, sociopaths that run a bar in the crappy end of Philadelphia. Since it is such a terrible bar, it has minimal attendance, leaving the gang free to go out and satisfy their selfish desires or explore an issue that they see (usually for some pathetic reason) as pressing. The title of the episode sums up the premise of the episode and the title is usually always provided as a punch line to a joke. Some examples being "Frank Sets Sweet Dee On Fire", "Who Pooped The Bed?" or "The Gang Finds a Dumpster Baby".
The show stars Glenn Howerton (from everyone's favourite That 80's Show) as the psychotic and horny Dennis Reynolds. Kaitlin Olson is Dennis' neurotic and heavily-mocked twin sister. Rob McElhenney plays the overconfident and macho Mac, Charlie Day (from this summer's hit Horrible Bosses) shines as the illiterate Charlie and finally Danny DeVito (from an actually prolific career) portrays the disgusting Frank Reynolds. Any pairing of the five characters can be hilarious and the show's writers/creators/stars know how to utilize their strengths to full force, at least most of the time. Like every show, there are a few clunker episodes here and there. There is rarely every a streak of slumps though and the show rebounds quickly.
When I first heard of this show, I was afraid it would rely too much on gross-out humour like Two and a Half Men. This show is more about characters who toe across the boundaries of normal human social interactions and through this, the humour is drawn. It's Always Sunny takes current topics like gay marriage and abortion and draws humour out of them by providing the view of the politically unaware person manipulating the issue to benefit themselves. For example, in a first season episode Mac with his Catholic pro-life stance joins a pro-life rally because he wants to bang its organizer, but switches to the pro-choice side by the end of the episode once he strikes out with her pulling a 180 on his religious beliefs in order to get laid.
Despite not being the funniest show ever created, or even one of the funniest shows even on TV presently, "It's Always Sunny in Philadelphia" is one of the most consistent shows. You will always be guaranteed a solid laugh with the Gang and you will grow oddly attached to some of the most unlikable scumbags to every disgrace your television screen.
There are currently No Comments on 'It's Always Sunny in Philadelphia': Crude, Dirty, Consistently Hilarious. Perhaps you would like to add one of your own?


Whether you are spoiling yourself or introducing someone on your list to all the amazing-ness that is Clean Beauty, Au Naturale has the perfect gift set for the season.
The lips oils will only be available via this set for most of November.
Fulfilling your clean beauty resolution has never been easier! This kit is a hand-picked collection of our best-selling staples, each infamous for their tendency to flatter all skin-tones + one of our NEW Lip Oils. All that's missing?! Your perfect match in a clean foundation or concealer – so we've included a $15 gift card to cover your Sample Bundle (or whatever else is on your wish list this year)!


You read that right, every idea is a fad. No truly it is. Here's why – to sustain a strong competitive position in the marketplace, an innovation HAS to be a fad. Every innovation must be replaced by a subsequent innovation thereby relegating the previous innovation to something that was important yesterday. Continuous innovation isn't just something which is a nice to have, it's a necessity for a long term sustainable business.
The critical characteristic of an innovation is determining it's competitive shelf life. In a low competition industry (say Cable), even small incremental innovations can provide a sustained advantage for much longer than a similar innovation would in a highly competitive industry (say Cell Phones). Competitive industries tend to move in a "neck and neck" type of race. i.e. Look at the race for 4G coverage.
Ultimately every innovation degrades from a competitive advantage to a commodity feature and is why innovation is a fad.


Before beginning this passage, I would like to first note that the topic discussed is a very sensitive but essential and must be discussed.
What does it mean to be a man? Gold? Girls? Huge Muscles? Toxic Masculinity defines stereotypes implemented by society onto men forcing a certain look or behavior. A common example would be the expectation that men aren't allowed to cry. The phrase "men don't cry" perfectly demonstrates an example of toxic masculinity. By enforcing a stereotype like "men don't cry," young male adolescents aren't able to express their feelings. Crying shouldn't be an "act of shame," yet it has become "shameful" due to societal norms. In fact, the concept of toxic masculinity derives from traditional gender roles in which women are expected to be polite and quiet while men are outgoing and active. Although, the world today has made impressive progress in achieving equality among genders, the concept of gender roles is still influencing society today.
For one, the media is a common source of toxic masculinity and divided gender roles. Male celebrities are photographed with perfectly toned abs and chiseled jawlines. Childhood TV shows portray male leads as domineering and powerful superheroes. Sitcoms make fun of male "friendships" as "gay." In an NBC News film, Toxic Masculinity in Boys is Fueling an Epidemic of Loneliness, the reporter brought up an interesting concept that boys are equating friendship with gayness. Some of the young interviewees in the film expressed love for their friends, but was reluctant to express such emotions as they feared it would mean they were "gay." Keeping in mind, that being gay isn't something to be ashamed or discriminated for. It has sadly become a reality that the rigid stereotypes and traditions once shaping our country is now harming the future of our nation.
Former President Barack Obama spoke of this issue in a conference for My Brother's Keeper initiative with NBA star, Steph Curry. The My Brother's Keeper program works toward breaking down barriers that leaves boys and young men of color at a disadvantage. According to Barack Obama, being a man isn't "eight-pound chains or women around you twerkin, it's about being a good human." Through his interview, Former President Barack Obama spoke out on how racism played a role in toxic masculinity. Because racism, itself, conveys a message that one person is "less then" someone else, humans feel the need to "compensate by exaggerating stereotypical ways men are supposed to react." He then provided examples on rap lyrics and how several African American hip hop lyrics are about flaunting one's wealth.


Entrance Barbwire fences over kilometers Watch the watchtower from the housing blocks In the blocks Marks of the Holocaust remain highly visible Clear to understand Countless piles of individually named luggage… …and shoes of victims. In a "living room" Approaching Birkenau "Beds" in the barracks More barbed wire fences View to no return Never forget!
A wonderful paradise, also for black and white photography.
Impressions from a 2006 tour. All photos taken by Canon EOS and EF lenses.
Strange fisherman's boat at Negombo beach.
Major world religions meet in the streets of Colombo.
Crosscountry and through the hills, you better take the train to get more impressions.
At tropical thunders not a real good shelter for tea pluckers.
In infra-red or real colors, there is good time at Sri Lanka's beaches.


We're constantly reminded of the negative effects social media has on our lives – including our self-confidence, body image, mental health and perceptions of beauty. However, new research has shown that social media could be permanently damaging something else – our memories.
To create a memory, your brain must register visual, auditory and olfactory senses to send the information to the hippocampus, which will decide if it'll be stored. Still with us? The amygdala (the part of the brain responsible for emotions) then releases hormones so that these experiences can be encoded as long-term memories, as they're more likely to make the cut if you're in a heightened physiological state, or if they're familiar – like your route home or the smell of your nan's perfume.
Social media is interrupting this process as we're literally putting a screen between us and the event, which stops the emotional connection, and means the memory isn't stored as deeply as it should be. Research suggests that this attentional disengagement, also known as the photo-taking-impairment effect, is to blame – the disengagement not only impairs immediate memory formation, but it can even stop the formation of the memory after the photo has been taken (since you're so busy sharing it on your social media platforms).
This phenomena is similar to cognitive uploading – a process in which people store their memories on an external memory source, like a phone or camera, rather than personally retaining them. Have you ever forgotten an event until a photo jogged your memory? Yep, you're guilty of cognitive offloading.
While it may seem obvious that you're less likely to remember events you photograph rather than those you observe, it's alarming when you think of the milestones you may have missed because you were experiencing them through your phone – like a friend's proposal or your child's first steps.
The release of 'stories' on Instagram and Snapchat are making matters worse. The feature allows real-time updates and glimpses into everyday life – from morning coffees to gym routines, bath time to traffic jams, we see almost every aspect of people's lives. Is society to blame for our constant posts? In such a fast-paced digital world, the pressure to keep up means we'll never be able to completely ditch our social media. Not only is there pressure to stay relevant and stand out among the 700 million other monthly users, it's almost necessary due to the amount of social media-related jobs – we bet you can't find someone that doesn't have 'content creator' in their Instagram bio.
The scariest part? Photo-sharing apps could potentially be damaging an entire generation's ability to stay present and engaged, impacting that population's ability to form long-term memories (which could last for the rest of their lives). Yikes. It's not hard to believe when you consider their favourite apps post content no more than 10 seconds long. Remember Vine?
"How can we save our memories?!" we hear you scream. Well, intentionality is key. In other words, if you're thoughtfully taking the photo for memory's sake, you'll remember the event better than if you're taking it to post online. So in the future, put your phone down and live in the moment - you'll enjoy being able to tell the story later (with all the details you would have otherwise forgotten).


Who says Austin gets to have all the celebrity fun — especially this time of year? Mya is throwing a party in Dallas to celebrate the release of her eighth studio album, Smoove Jones, and you're invited.
The Grammy Award winner chose Big D as the only city for a release party, held March 12 at 10 pm, at Hard Rock Cafe. Tickets to the public event, which range from $11 to $103, are on sale now. Only those 21 and up can attend.
The Dallas party takes place just a week before Mya performs live on the Outdoor Stage at Ladybird Lake at the SXSW Festival in Austin, on March 20.


Nike Sportswear adds their newest silhouette, the EXP-X14, to their Just Do It Collection.
The Nike EXP-X14 is Nike's newest lifestyle silhouette that hints Nike's performance history with the sport of running. This pack features two color options, one in White and the other in Black, both come with Orange accents and with Nike's "Just Do It" motto, translucent uppers and a Nike React midsole.
The Nike EXP-X14 "Just Do It" Pack is set to release soon at select Nike Sportswear retailers and Nike.com.


text:
Archdiocese • Local
Chuck Smrt, a parishioner at Curé of Ars in Leawood, has fostered a devotion to the Infant of Prague for decades. Currently, he has 16 statues of the Infant, and he is exploring ways to help others develop or further a similar devotion. LEAVEN PHOTO BY MARC ANDERSON
mjanderson@theleaven.org
LEAWOOD — He doesn't collect them.
After all, he explained, one collects baseball cards or Beanie Babies.
Nevertheless, Chuck Smrt, a parishioner of Curé of Ars in Leawood, has at least 16 different statues of the Infant Jesus of Prague, more commonly known as the Infant of Prague.
The original Infant Jesus of Prague is a small statue dating back to the 17th century. It is just 19" tall, and is made of wood, wax and cloth. But replicas of it come in all shapes and sizes, and feature the Infant Jesus dressed in royal robes and wearing a king's crown. (For more on the origin and history of the devotion, see below.)
Most of Smrt's statues have come as gifts from family and friends in response to his strong devotion to the Infant Jesus.
In recent years, Smrt said his desire to help others foster a similar devotion has grown considerably. He's been mulling over ideas, and he's even considering sharing some of his statues.
"If someone needs an Infant, I'd love to give it to them," he said. "That's what I'm trying to figure out. I don't want to have a bunch of Infants on a shelf."
Chuck Smrt holds one of his 16 statues of the Infant of Prague. LEAVEN PHOTO BY MARC ANDERSON
Still, there are some he'll keep, especially the one from his "Gram."
"My grandmother had that Infant on the TV," he recalled. "So, we would go over there for all these different functions on Sunday afternoons, and all of the guys would go into the living room to watch TV. That Infant sat there all those years. So, I grew up seeing that Infant."
After his grandmother died, the statue passed to an uncle. Later, his uncle gave it to him. The statue is at least 80 or 90 years old, if not older.
Shortly thereafter, Smrt's wife Gina received another statue — one made from wax. Like his grandmother's statue, it, too, had been a cherished possession of Gina's aunt. Around that same time in 1995, the couple made a pilgrimage to Prague. It was there that Smrt found his devotion soared, literally and figuratively.
The original statue stands around 18.5 inches tall and sits high atop an altar in the Church of Our Lady Victorious in Prague, the capital of the Czech Republic.
"If you're in that church, you're there for one reason," Smrt said.
Sister Mary Rosaleen Driscoll, SCL, agreed.
Like Smrt, she, too, has a devotion to the Infant of Prague. In 2017, parishioners at Sacred Heart-St. Joseph Parish, where she lives in Topeka, surprised her and her niece with a trip to Poland and the Czech Republic in honor of her 70th anniversary as a nun.
"It was awesome," she said of seeing the Infant. As she recalled the memory of being before the Infant statue, her face lit up with joy.
Sister Mary Rosaleen Driscoll, SCL, first implored the Infant for assistance during the 1950s. At 93, she has been a religious Sister for more than 70 years and is in residence at Sacred Heart-St. Joseph Parish in Topeka. She tries to always give the Infant "a little love" whenever she passes an Infant of Prague statue because "he's so special." LEAVEN PHOTO BY MARC ANDERSON
Likewise, Smrt said he recalls being utterly awed in the presence of that original statue, a statue which by all accounts, dates back to at least the 1500s.
"It was very emotional," he said
Several years ago, Smrt battled cancer. He's been cancer-free for three years, something he attributes to the Infant Jesus.
In fact, after he was declared free of cancer, he invited everyone who had prayed for him to Saturday morning Mass at Holy Trinity in Lenexa, where he and his family had belonged for many years. After Mass, Smrt treated everyone to breakfast and shared information about the Infant Jesus, bringing along some of his precious statues. Nowadays, he is asking the Infant to help him lead others to a devotion to the Christ Child.
As the church celebrates the birth of Christ at this time of year, Sister Mary Rosaleen and Smrt said it's natural for people to think of the Christ Child, but it's something they do every day.
In Sister Mary Rosaleen's case, she started the practice more than 60 years ago.
In the early 1950s, the nun was placed in charge of the pediatrics ward of St. Vincent Hospital in Billings, Montana.
"They had a statue there of the Infant," she said. "And I think when I really, really knew how powerful he was, I had three children with tracheotomies that I was taking care of in the ward, and it was life or death for them."
Two of the boys were brothers, suffering the effects of smoke inhalation due to a house fire. A third boy had been stepped on the throat by a horse.
"So, I had three very, very critically ill children," she added, and knew she desperately needed divine assistance.
"We had a beautiful statue in the hallway, and I took it out of the hallway and put it in their room," she continued. "That's when I really found out about the Infant. As much as I could, I made the nine-hour novena, and all of them survived. All of them got to go home. And so, I attribute that to the Infant."
Witnessing the boys' recovery, Sister Mary Rosaleen said she fell in love with the Infant and attributes a lot of answered prayers to his intercession. To this day, she never passes by a statue of the Infant without offering him affection.
"When I go by the Infant, I try to give him a little love because he's so special," she said.
Devotion intertwined with Czech history
Most experts agree knowing the exact history of the Infant of Prague is not as important as honoring the Christ Child. Still, its history helps explain the devotion and its prevalence among Czech communities such as Chuck Smrt's hometown of North Judson, Indiana.
Chuck Smrt holds a book on the Infant of Prague. LEAVEN PHOTO BY MARC ANDERSON
1500s — A statue of the Child Jesus originates in Spain. Accounts differ as to whether the Infant Jesus appears in a vision to a monk who fashions the statue based on his vision or whether St. Teresa of Avila owns the statue.
1556 — The statue of the Infant Jesus is brought to Prague by the Spanish Duchess Marie Manriquez de Lcara who married Vrastislav of Pernstein. The duchess later gives the statue to her daughter Polyxena as a wedding present.
1628 — Polyxena donates the statue to the monastery of Discalced Carmelites at the Church of Our Lady Victorious. The Carmelites place the statue in the novitiate chapel and pray for the monks to learn the virtues of the Christ Child.
1631 — During a siege of Prague, the Carmelites flee the monastery. The monastery is plundered, and the statue is discarded.
1637 — Father Cyril of the Mother of God returns to Prague and finds the statue in a pile of junk with both its arms missing. During prayer he hears Jesus say, "Have mercy on me, and I will have mercy on you. Give me my arms, and I will give you my peace. I will bless you as much as you will venerate me!" Eventually, the monk has new arms made for the Infant Jesus.
1641 — The statue is moved to a chapel in the church for public veneration.
1651 — The Infant is carried in processions throughout the city of Prague.
1655 — The bishop of Prague crowns the statue.
1741 — Due to increasing crowds, the statue is relocated to the main church.
1754 — Empress Marie Terezie donates an embroidered robe to the Infant Jesus. Veneration of the Infant spreads throughout the former countries of the Austrian Empire.
1784 — Josef II launches a campaign against monasteries and religion. The Carmelite monastery is abolished, and the church as well as the altar of the Infant Jesus suffer from decay.
1879 — The Infant Jesus makes a pilgrimage through Prague's convents. Monies raised from the pilgrimage pay for the altar's restoration, and veneration to the Infant Jesus is revived. Stories of miracles stream in from throughout the Austro-Hungarian Empire.
1896 — Pope Leo XIII officially approves the devotion to the image
Early 1900s — Veneration of the Infant Jesus spreads throughout the world, especially in Spain and Portugal. Missionaries cultivate a love for the Infant in India, China, the Philippines and North America.
1924 — Pope Pius XI grants the first canonical coronation of the Infant Jesus of Prague.
1928 — Celebrations mark the 300th anniversary of the arrival of the Infant Jesus in Prague.
1939 – 1989 — Nazi and Communist regimes silence veneration of the Infant Jesus.
1993 — The Discalced Carmelites return to the Church of Our Lady Victorious, and with them, a renewed interest in and devotion to the Infant Jesus.
2009 — Pope Benedict XVI visits Prague, offering a crown as a present for the Infant.
A prayer to the Infant Jesus of Prague
Prayer offered by Pope Benedict in his crowning of the Infant in Prague in 2009:
O my Lord Jesus, we gaze on you as a child and believe that you are the Son of God, who became man through the working of the Holy Spirit in the womb of the Virgin Mary. Just as in Bethlehem, we, too, adore you, with Mary, Joseph, the angels and the shepherds, and acknowledge you as our only Savior. You became poor to enrich us with your poverty. Grant that we may never forget the poor and all those who suffer. Protect our families, bless all the children of the world and grant that the love you have brought us may always reign among us and lead us to a happier life. Grant, O Jesus, that all may recognize the truth of your birth, so that all may know that you have come to bring to the whole human family light, joy and peace. You are God, who live and reign with God the Father, in the unity of the Holy Spirit, one God, forever and ever. Amen.
Source: https://www.pragjesu.cz/ and catholicexchange.com
Moral considerations regarding the new COVID-19 vaccines

redpajama_set_name: RedPajamaCommonCrawl


text:
Football Sport
International Friendlies to Prepare for World Cup
by Elijah Lavett 21/04/2016 02/06/2016 524
By Elijah Lavett – EM TV Sport, Port Moresby
FIFA U20 Women's World Cup Local Organising Committee CEO, Seamus Marten, says they are close to confirming the dates of various international friendlies.
These matches may be held next month here in Papua New Guinea, along with the Oceania Nations Cup.
The committee are still in discussions with Japan and the United States of America, to confirm the order of matches.
These matches are key friendlies in preparation for the FIFA U20 Women's World Cup in November. The Papua New Guinea team will face sides from both Japan and the United States.
Marten said with the help of PNGFA President and FIFA Vice President, David Chung, they were able to organise these matches.
With USA and Japan to play a series of matches in Papua New Guinea before the World Cup, this will play a crucial part in PNG's preparations.
https://youtube.com/watch?v=BDSVpUXOEnQ%3Ffeature%3Doembed%26wmode%3Dopaque%26showinfo%3D0%26showsearch%3D0%26rel%3D0
Business PNG – Episode 12, 2016
Haus & Home – Episode 16, 2016
Elijah Lavett
is the youngest member of the EMTV Sports team at age 20. He is the resident Squash-master, but also enjoys Tennis and is an avid fan of the SP Hunters, all while hosting the long-running Sport Scene program.
Team Southern Highlands Boosted
PNG U17 Girls in Grand Final
Elijah Lavett 22/01/2016 02/06/2016
PNG To Host Oceania Table Tennis Cup


text:
using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;

using vm.Aspects.Security.Cryptography.Ciphers.Properties;

namespace vm.Aspects.Security.Cryptography.Ciphers
{
    /// <summary>
    /// The <c>EncryptedKeyCipher</c> is a symmetric cipher. The symmetric key is encrypted with an asymmetric algorithm and so saved in a file.
    /// This class also defines a set of crypto-operations (virtual protected methods)
    /// for the descending classes which implement the various steps of the methods (GoF template pattern)
    /// that compose and decompose the crypto-packages.
    /// </summary>
    /// <remarks>
    /// <para>
    /// By default the cipher uses the <see cref="AesCryptoServiceProvider"/> with default parameters.
    /// </para><para>
    /// The cipher can be used for protecting data in motion where the sender has access to the public key and
    /// the receiver owns the private key. It can be used also to encrypt data at rest, e.g. stored in a database, file, etc.
    /// where the writer owns the private key and the reader has access to the public key.
    /// </para><para>
    /// The asymmetric key can be stored in a:
    /// <list type="bullet">
    ///     <item>key container, in which case the class will locate the key container using an implementation of <see cref="IKeyLocationStrategy"/></item>
    ///     <item>or the sender of the crypto-package can use a public key stored in a public certificate which corresponds to
    ///           a private certificate owned by the receiver. The private certificate stores the private key too.</item>
    /// </list>
    /// </para><para>
    /// The encrypted symmetric key is stored in a file. The class determines the path and name of the file from an <see cref="IKeyLocationStrategy"/> object.
    /// If the key file does not exist a new key is generated, encrypted and saved in a file in the location determined by the <see cref="IKeyLocationStrategy"/> object.
    /// </para><para>
    /// Note that this cipher uses one symmetric key for all packages.
    /// It performs faster than the <see cref="T:vm.Aspects.Security.Cryptography.Ciphers.ProtectedKeyCipher"/>.
    /// Which cipher to use is a matter of compromise. <see cref="T:vm.Aspects.Security.Cryptography.Ciphers.ProtectedKeyCipher"/>
    /// encrypts and stores or retrieves and decrypts a single symmetric key once per the life time of the cipher.
    /// However the file containing the encrypted symmetric key needs to be managed separately and if compromised all encrypted documents will be compromised too.
    /// </para><para>
    /// Crypto package contents:
    /// <list type="number">
    ///     <item><description>The length of the initialization vector of the encrypted symmetric cipher (serialized Int32) - 4 bytes.</description></item>
    ///     <item><description>The bytes of the encrypted initialization vector.</description></item>
    ///     <item><description>The bytes of the encrypted text.</description></item>
    /// </list>
    /// </para><para>
    /// The cipher can also be used to encrypt elements of or entire XML documents.
    /// </para>
    /// </remarks>
    public class EncryptedKeyCipher : SymmetricKeyCipherBase, ICipherTasks, ILightCipher
    {
        #region Properties
        /// <summary>
        /// Gets or sets the public key used for encrypting the symmetric key.
        /// </summary>
        /// <value>The public key.</value>
        protected RSACryptoServiceProvider PublicKey { get; set; }
        /// <summary>
        /// Gets or sets the private key used for decrypting the symmetric key.
        /// </summary>
        /// <value>The private key.</value>
        protected RSACryptoServiceProvider PrivateKey { get; set; }

        /// <summary>
        /// Flag indicating whether to encrypt the initialization vector. Here the setter checks if the certificate has a private key.
        /// </summary>
        public override bool ShouldEncryptIV
        {
            get { return base.ShouldEncryptIV; }
            set
            {
                if (value == true  &&  PrivateKey == null)
                    throw new InvalidOperationException("The certificate does not contain a private key.");
                base.ShouldEncryptIV = value;
            }
        }
        #endregion

        #region Constructors
        /// <summary>
        /// Initializes a new instance of the <see cref="EncryptedNewKeyCipher" /> class.
        /// </summary>
        /// <param name="certificate">
        /// The certificate containing the public and optionally the private key for encryption and decryption of the symmetric key.
        /// </param>
        /// <param name="symmetricKeyLocation">
        /// Seeding name of store location name of the encrypted symmetric key (e.g. relative or absolute path).
        /// The parameter will be passed to the <paramref name="symmetricKeyLocationStrategy" /> to determine the final store location name path
        /// (e.g. relative or absolute path).
        /// </param>
        /// <param name="symmetricKeyLocationStrategy">
        /// Object which implements the strategy for determining the store location name (e.g. path and filename) of the encrypted symmetric key.
        /// If <see langword="null" /> it defaults to a new instance of the class <see cref="DefaultServices.KeyFileLocationStrategy" />.
        /// </param>
        /// <param name="keyStorage">
        /// Object which implements the storing and retrieving of the the encrypted symmetric key to and from the store with the determined location name.
        /// If <see langword="null" /> it defaults to a new instance of the class <see cref="DefaultServices.KeyFileStorage" />.
        /// </param>
        /// <param name="symmetricAlgorithmName">
        /// The name of the symmetric algorithm implementation. You can use any of the constants from <see cref="Algorithms.Symmetric" /> or
        /// <see langword="null" />, empty or whitespace characters only - these will default to <see cref="Algorithms.Symmetric.Default" />.
        /// </param>
        /// <param name="symmetricAlgorithmFactory">
        /// The symmetric algorithm factory. If <see langword="null" /> the constructor will create an instance of the default <see cref="DefaultServices.SymmetricAlgorithmFactory" />,
        /// which uses the <see cref="SymmetricAlgorithm.Create(string)" /> method from the .NET library.
        /// </param>
        /// <exception cref="System.ArgumentNullException">Thrown when the <paramref name="certificate" /> is <see langword="null" />.</exception>
        public EncryptedKeyCipher(
            X509Certificate2 certificate,
            string symmetricKeyLocation = null,
            IKeyLocationStrategy symmetricKeyLocationStrategy = null,
            IKeyStorageTasks keyStorage = null,
            string symmetricAlgorithmName = Algorithms.Symmetric.Default,
            ISymmetricAlgorithmFactory symmetricAlgorithmFactory = null)
            : this(certificate, symmetricAlgorithmName, symmetricAlgorithmFactory)
        {
            ResolveKeyStorage(symmetricKeyLocation, symmetricKeyLocationStrategy, keyStorage);
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="EncryptedKeyCipher" /> class for initialization by the constructors of the inheriting classes.
        /// </summary>
        /// <param name="certificate">
        /// The certificate containing the public and optionally the private key for encryption and decryption of the symmetric key.
        /// </param>
        /// <param name="symmetricAlgorithmName">
        /// The name of the symmetric algorithm implementation. You can use any of the constants from <see cref="Algorithms.Symmetric" /> or
        /// <see langword="null" />, empty or whitespace characters only - these will default to <see cref="Algorithms.Symmetric.Default" />.
        /// </param>
        /// <param name="symmetricAlgorithmFactory">
        /// The symmetric algorithm factory. If <see langword="null" /> the constructor will create an instance of the default <see cref="DefaultServices.SymmetricAlgorithmFactory" />,
        /// which uses the <see cref="SymmetricAlgorithm.Create(string)" /> method from the .NET library.
        /// </param>
        protected EncryptedKeyCipher(
            X509Certificate2 certificate,
            string symmetricAlgorithmName = Algorithms.Symmetric.Default,
            ISymmetricAlgorithmFactory symmetricAlgorithmFactory = null)
            : base(symmetricAlgorithmName, symmetricAlgorithmFactory)
        {
            InitializeAsymmetricKeys(certificate);
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="EncryptedKeyCipher" /> class.
        /// </summary>
        /// <param name="symmetricAlgorithmName">
        /// The name of the symmetric algorithm implementation. You can use any of the constants from <see cref="Algorithms.Symmetric" /> or
        /// <see langword="null" />, empty or whitespace characters only - these will default to <see cref="Algorithms.Symmetric.Default" />.
        /// </param>
        /// <param name="symmetricAlgorithmFactory">
        /// The symmetric algorithm factory. If <see langword="null" /> the constructor will create an instance of the default <see cref="DefaultServices.SymmetricAlgorithmFactory" />,
        /// which uses the <see cref="SymmetricAlgorithm.Create(string)" /> method from the .NET library.
        /// </param>
        protected EncryptedKeyCipher(
            string symmetricAlgorithmName = Algorithms.Symmetric.Default,
            ISymmetricAlgorithmFactory symmetricAlgorithmFactory = null)
            : base(symmetricAlgorithmName, symmetricAlgorithmFactory)
        {
        }
        #endregion

        #region ICipher Members
        /// <summary>
        /// Gets or sets a value indicating whether the encrypted texts are or should be Base64 encoded.
        /// </summary>
        public virtual bool Base64Encoded { get; set; }

        /// <summary>
        /// Reads the clear text from the <paramref name="dataStream"/> encrypts it and writes the result into the <paramref name="encryptedStream"/>
        /// stream. This is the reverse method of <see cref="M:Decrypt(System.Stream, System.Stream)"/>.
        /// </summary>
        /// <param name="dataStream">
        /// The unencrypted input stream.
        /// </param>
        /// <param name="encryptedStream">
        /// The output stream where to write the crypto package which will contain the encrypted data
        /// as well as some other crypto artifacts, e.g. initialization vector.
        /// </param>
        /// <exception cref="T:System.ArgumentNullException">
        /// Thrown when either <paramref name="dataStream"/> or <paramref name="encryptedStream"/> are <see langword="null"/>.
        /// </exception>
        /// <exception cref="T:System.ArgumentException">
        /// Thrown when either <paramref name="dataStream"/> cannot be read or
        /// <paramref name="encryptedStream"/> cannot be written to.
        /// </exception>
        /// <exception cref="T:System.Security.CryptographicException">
        /// The encryption failed.
        /// </exception>
        /// <exception cref="T:System.IO.IOException">
        /// An I/O error occurred.
        /// </exception>
        [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "The CryptoStream will do it.")]
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "1")]
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
        public virtual void Encrypt(
            Stream dataStream,
            Stream encryptedStream)
        {
            if (dataStream == null)
                throw new ArgumentNullException(nameof(dataStream));
            if (encryptedStream == null)
                throw new ArgumentNullException(nameof(encryptedStream));
            if (!dataStream.CanRead)
                throw new ArgumentException(Resources.StreamNotReadable, nameof(dataStream));
            if (!encryptedStream.CanWrite)
                throw new ArgumentException(Resources.StreamNotWritable, nameof(encryptedStream));

            // generate, read from store, etc.
            InitializeSymmetricKey();

            // if the output needs to be Base-64 encoded, wrap the encoded stream in a crypto stream applying Base64 transformation
            var outputStream = Base64Encoded
                                    ? new CryptoStream(encryptedStream, new ToBase64Transform(), CryptoStreamMode.Write)
                                    : encryptedStream;

            try
            {
                // store IV, etc.
                BeforeWriteEncrypted(outputStream);

                // wrap the output stream into a crypto-stream;
                // and copy the input stream into the crypto-stream;
                using (var cryptoStream = CreateEncryptingStream(outputStream))
                {
                    DoEncrypt(dataStream, cryptoStream);
                    // output hash, signature, etc.
                    AfterWriteEncrypted(encryptedStream, cryptoStream);
                }
            }
            finally
            {
                if (Base64Encoded)
                    outputStream.Dispose();
            }
        }

        /// <summary>
        /// Reads and decrypts the <paramref name="encryptedStream"/> stream and writes the clear text into the <paramref name="dataStream"/> stream.
        /// This is the reverse method of <see cref="M:Encrypt(System.Stream, System.Stream)"/>.
        /// </summary>
        /// <param name="encryptedStream">
        /// The input crypto package stream which contains the encrypted data
        /// as well as some other crypto artifacts, e.g. initialization vector, hash, etc.
        /// </param>
        /// <param name="dataStream">
        /// The output stream where to put the unencrypted data.
        /// </param>
        /// <exception cref="T:System.ArgumentNullException">
        /// Thrown when either <paramref name="encryptedStream"/> or <paramref name="dataStream"/> are <see langword="null"/>.
        /// </exception>
        /// <exception cref="T:System.ArgumentException">
        /// Thrown when either <paramref name="dataStream"/> cannot be written to or
        /// <paramref name="encryptedStream"/> cannot be read from.
        /// </exception>
        /// <exception cref="T:System.Security.CryptographicException">
        /// The decryption failed.
        /// </exception>
        /// <exception cref="T:System.IO.IOException">
        /// An I/O error occurred.
        /// </exception>
        [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "The CryptoStream will do it.")]
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "1")]
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
        public virtual void Decrypt(
            Stream encryptedStream,
            Stream dataStream)
        {
            if (encryptedStream == null)
                throw new ArgumentNullException(nameof(encryptedStream));
            if (dataStream == null)
                throw new ArgumentNullException(nameof(dataStream));
            if (!encryptedStream.CanRead)
                throw new ArgumentException(Resources.StreamNotReadable, nameof(encryptedStream));
            if (!dataStream.CanWrite)
                throw new ArgumentException(Resources.StreamNotWritable, nameof(dataStream));

            // generate, read from store, etc.
            InitializeSymmetricKey();

            // if the output needs to be Base-64 encoded, wrap the encoded stream in a crypto stream applying Base64 transformation
            var inputStream = Base64Encoded
                                    ? new CryptoStream(encryptedStream, new FromBase64Transform(), CryptoStreamMode.Read)
                                    : encryptedStream;

            try
            {
                // restore IV, etc.
                BeforeReadDecrypted(inputStream);

                // wrap the input stream with a crypto stream;
                // and copy the crypto stream into the output stream
                using (var cryptoStream = CreateDecryptingStream(inputStream))
                {
                    DoDecrypt(cryptoStream, dataStream);
                    // output hash, signature, etc.
                    AfterReadDecrypted(cryptoStream, cryptoStream);
                }
            }
            catch (FormatException x)
            {
                if (!Base64Encoded)
                    throw;

                throw new ArgumentException("The input data does not represent a valid, Base64 encoded, crypto package.", x);
            }
            finally
            {
                if (Base64Encoded)
                    inputStream.Dispose();
            }
        }

        /// <summary>
        /// Encrypts the specified <paramref name="data"/>. This is the reverse method of <see cref="M:Decrypt(byte[])"/>.
        /// </summary>
        /// <param name="data">
        /// The data to be encrypted.
        /// </param>
        /// <returns>
        /// The bytes of the crypto package which contains the encrypted data
        /// as well as some other crypto artifacts, e.g. initialization vector, hash, etc.
        /// Or returns <see langword="null"/> if <paramref name="data"/> is <see langword="null"/>.
        /// </returns>
        /// <exception cref="T:System.Security.CryptographicException">
        /// The encryption failed.
        /// </exception>
        public virtual byte[] Encrypt(
            byte[] data)
        {
            if (data == null)
                return null;

            using (var dataStream = new MemoryStream(data))
            using (var encryptedStream = new MemoryStream())
            {
                Encrypt(dataStream, encryptedStream);
                encryptedStream.Close();
                return encryptedStream.ToArray();
            }
        }

        /// <summary>
        /// Decrypts the specified <paramref name="encryptedData"/>.
        /// This is the reverse method of <see cref="M:Encrypt(byte[])"/>.
        /// </summary>
        /// <param name="encryptedData">
        /// The bytes of the crypto package which contains the encrypted data
        /// as well as some other crypto artifacts, e.g. initialization vector, hash, etc.
        /// If <paramref name="encryptedData"/> is <see langword="null"/> the method returns <see langword="null"/>.
        /// </param>
        /// <returns>
        /// The decrypted <paramref name="encryptedData"/> or <see langword="null"/> if <paramref name="encryptedData"/> is <see langword="null"/>.
        /// </returns>
        /// <exception cref="T:System.Security.CryptographicException">
        /// The encryption failed.
        /// </exception>
        public virtual byte[] Decrypt(
            byte[] encryptedData)
        {
            if (encryptedData == null)
                return null;

            using (var encryptedStream = new MemoryStream(encryptedData))
            using (var dataStream = new MemoryStream())
            {
                Decrypt(encryptedStream, dataStream);
                dataStream.Close();
                return dataStream.ToArray();
            }
        }
        #endregion

        #region ICipherAsync Members
        /// <summary>
        /// Asynchronously reads the clear text from the <paramref name="dataStream"/>, encrypts it and writes the result into the
        /// <paramref name="encryptedStream"/> stream. This is the reverse method of <see cref="M:DecryptAsync(System.Stream, System.Stream)"/>.
        /// </summary>
        /// <param name="dataStream">
        /// The unencrypted input stream.
        /// </param>
        /// <param name="encryptedStream">
        /// The output stream where to write the crypto package which will contain the encrypted data
        /// as well as some other crypto artifacts, e.g. initialization vector, hash, etc.
        /// </param>
        /// <returns>
        /// A <see cref="Task"/> object which represents the process of asynchronous encryption.
        /// </returns>
        /// <exception cref="T:System.ArgumentNullException">
        /// Thrown when either <paramref name="dataStream"/> or <paramref name="encryptedStream"/> are <see langword="null"/>.
        /// </exception>
        /// <exception cref="T:System.ArgumentException">
        /// Thrown when either <paramref name="dataStream"/> cannot be read or
        /// <paramref name="encryptedStream"/> cannot be written to.
        /// </exception>
        /// <exception cref="T:System.Security.CryptographicException">
        /// The encryption failed.
        /// </exception>
        /// <exception cref="T:System.IO.IOException">
        /// An I/O error occurred.
        /// </exception>
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "1")]
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
        public virtual async Task EncryptAsync(
            Stream dataStream,
            Stream encryptedStream)
        {
            if (dataStream == null)
                throw new ArgumentNullException(nameof(dataStream));
            if (encryptedStream == null)
                throw new ArgumentNullException(nameof(encryptedStream));
            if (!dataStream.CanRead)
                throw new ArgumentException(Resources.StreamNotReadable, nameof(dataStream));
            if (!encryptedStream.CanWrite)
                throw new ArgumentException(Resources.StreamNotWritable, nameof(encryptedStream));

            // generate, read from store, etc.
            await InitializeSymmetricKeyAsync();

            // store IV, etc.
            await BeforeWriteEncryptedAsync(encryptedStream);

            // wrap the output stream into a crypto-stream;
            // and copy the input stream into the crypto-stream;
            using (var cryptoStream = CreateEncryptingStream(encryptedStream))
            {
                await DoEncryptAsync(dataStream, cryptoStream);

                // output hash, signature, etc.
                AfterWriteEncrypted(encryptedStream, cryptoStream);
            }
        }

        /// <summary>
        /// Asynchronously reads and decrypts the <paramref name="encryptedStream"/> stream and writes the clear text into the
        /// <paramref name="dataStream"/> stream. This is the reverse method of <see cref="M:EncryptAsync(System.Stream, System.Stream)"/>.
        /// </summary>
        /// <param name="encryptedStream">
        /// The input crypto package stream which contains the encrypted data
        /// as well as some other crypto artifacts, e.g. initialization vector, hash, etc.
        /// </param>
        /// <param name="dataStream">
        /// The output stream where to put the unencrypted data.
        /// </param>
        /// <returns>
        /// A <see cref="Task"/> object which represents the process of asynchronous decryption.
        /// </returns>
        /// <exception cref="T:System.ArgumentNullException">
        /// Thrown when either <paramref name="encryptedStream"/> or <paramref name="dataStream"/> are <see langword="null"/>.
        /// </exception>
        /// <exception cref="T:System.ArgumentException">
        /// Thrown when either <paramref name="dataStream"/> cannot be written to or
        /// <paramref name="encryptedStream"/> cannot be read from.
        /// </exception>
        /// <exception cref="T:System.Security.CryptographicException">
        /// The decryption failed.
        /// </exception>
        /// <exception cref="T:System.IO.IOException">
        /// An I/O error occurred.
        /// </exception>
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "1")]
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
        public virtual async Task DecryptAsync(
            Stream encryptedStream,
            Stream dataStream)
        {
            if (encryptedStream == null)
                throw new ArgumentNullException(nameof(encryptedStream));
            if (dataStream == null)
                throw new ArgumentNullException(nameof(dataStream));
            if (!encryptedStream.CanRead)
                throw new ArgumentException(Resources.StreamNotReadable, nameof(encryptedStream));
            if (!dataStream.CanWrite)
                throw new ArgumentException(Resources.StreamNotWritable, nameof(dataStream));

            // generate, read from store, etc.
            await InitializeSymmetricKeyAsync();

            // store IV, etc.
            await BeforeReadDecryptedAsync(encryptedStream);

            // wrap the input stream with a crypto stream;
            // and copy the crypto stream into the output stream
            using (var cryptoStream = CreateDecryptingStream(encryptedStream))
            {
                await DoDecryptAsync(cryptoStream, dataStream);

                // output hash, signature, etc.
                AfterReadDecrypted(cryptoStream, cryptoStream);
            }
        }
        #endregion

        /// <summary>
        /// Initializes the asymmetric key.
        /// </summary>
        /// <param name="certificate">The certificate.</param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown if <paramref name="certificate"/> is <see langword="null"/>
        /// </exception>.
        protected void InitializeAsymmetricKeys(
            X509Certificate2 certificate)
        {
            if (certificate == null)
                throw new ArgumentNullException(nameof(certificate));

            PublicKey = (RSACryptoServiceProvider)certificate.PublicKey.Key;

            if (certificate.HasPrivateKey)
                PrivateKey = (RSACryptoServiceProvider)certificate.PrivateKey;
        }

        #region Initialization of the symmetric key overrides
        /// <summary>
        /// Encrypts the symmetric key using the public key.
        /// </summary>
        /// <remarks>
        /// The method is called by the GoF template-methods.
        /// </remarks>
        /// <returns>System.Byte[].</returns>
        protected override byte[] EncryptSymmetricKey()
        {
            if (PublicKey == null)
                throw new InvalidOperationException("The method is not available on light clones.");

            return PublicKey.Encrypt(Symmetric.Key, true);
        }

        /// <summary>
        /// Decrypts the symmetric key using the private key.
        /// </summary>
        /// <remarks>
        /// The method is called by the GoF template-methods.
        /// </remarks>
        /// <param name="encryptedKey">The encrypted key.</param>
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
        protected override void DecryptSymmetricKey(
            byte[] encryptedKey)
        {
            if (encryptedKey == null)
                throw new ArgumentNullException(nameof(encryptedKey));
            if (encryptedKey.Length == 0)
                throw new ArgumentException(Resources.InvalidArgument, nameof(encryptedKey));
            if (PublicKey == null)
                throw new InvalidOperationException("The method is not available on light clones.");
            if (PrivateKey == null)
                throw new InvalidOperationException("The certificate does not contain a private key.");

            Symmetric.Key = PrivateKey.Decrypt(encryptedKey, true);
            IsSymmetricKeyInitialized = true;
        }
        #endregion

        #region Encrypting primitives
        /// <summary>
        /// Allows the inheritors to write some unencrypted information to the <paramref name="encryptedStream"/>
        /// before the encrypted text, e.g. here the cipher writes the initialization vector.
        /// </summary>
        /// <remarks>
        /// The method is called by the GoF template-methods.
        /// </remarks>
        /// <param name="encryptedStream">The encrypted stream.</param>
        /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="encryptedStream"/> is <see langword="null"/>.</exception>
        /// <exception cref="System.ArgumentException">Thrown when <paramref name="encryptedStream"/> cannot be written to.</exception>
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
        protected virtual void BeforeWriteEncrypted(
            Stream encryptedStream)
        {
            if (encryptedStream == null)
                throw new ArgumentNullException(nameof(encryptedStream));
            if (!encryptedStream.CanWrite)
                throw new ArgumentException(Resources.StreamNotWritable, nameof(encryptedStream));
            if (!IsSymmetricKeyInitialized)
                throw new InvalidOperationException(Resources.UninitializedSymmetricKey);

            Symmetric.GenerateIV();

            var encryptedIV = EncryptIV();

            // write the length and the contents of the IV in the encrypted stream
            encryptedStream.Write(BitConverter.GetBytes(encryptedIV.Length), 0, sizeof(int));
            encryptedStream.Write(encryptedIV, 0, encryptedIV.Length);
        }

        /// <summary>
        /// Encrypts the symmetric cipher's initialization vector.
        /// </summary>
        /// <returns>The encrypted initialization vector.</returns>
        /// <remarks>The method is called by the GoF template-methods.</remarks>
        protected virtual byte[] EncryptIV()
        {
            if (!IsSymmetricKeyInitialized)
                throw new InvalidOperationException(Resources.UninitializedSymmetricKey);
            if (ShouldEncryptIV  &&  PublicKey == null)
                throw new InvalidOperationException("The method is not available on light clones.");

            return ShouldEncryptIV
                        ? PublicKey.Encrypt(Symmetric.IV, true)
                        : Symmetric.IV;
        }

        /// <summary>
        /// Creates the encrypting stream and gives an opportunity to the inheritors to modify the creation of the crypto-stream,
        /// e.g. wrap or chain the crypto-stream created here with another crypto-stream that computes a hash of the unencrypted document.
        /// </summary>
        /// <remarks>
        /// The method is called by the GoF template-methods.
        /// </remarks>
        /// <param name="encryptedStream">The encrypted stream.</param>
        /// <returns>The created CryptoStream.</returns>
        /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="encryptedStream"/> is <see langword="null"/>.</exception>
        /// <exception cref="System.ArgumentException">Thrown when <paramref name="encryptedStream"/> cannot be written.</exception>
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
        protected virtual CryptoStream CreateEncryptingStream(
            Stream encryptedStream)
        {
            if (encryptedStream == null)
                throw new ArgumentNullException(nameof(encryptedStream));
            if (!encryptedStream.CanWrite)
                throw new ArgumentException(Resources.StreamNotWritable, nameof(encryptedStream));

            return new CryptoStream(
                            encryptedStream,
                            Symmetric.CreateEncryptor(),
                            CryptoStreamMode.Write);
        }

        /// <summary>
        /// Performs the actual encryption of the <paramref name="dataStream"/> and writing into the <paramref name="cryptoStream"/>.
        /// Also gives opportunity to the inheritors to modify the actual encryption process.
        /// </summary>
        /// <remarks>
        /// The method is called by the GoF template-methods.
        /// </remarks>
        /// <param name="dataStream">The data stream.</param>
        /// <param name="cryptoStream">The crypto stream.</param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when either <paramref name="cryptoStream"/> or <paramref name="dataStream"/> are <see langword="null"/>.
        /// </exception>
        /// <exception cref="System.ArgumentException">
        /// Thrown when either <paramref name="dataStream"/> cannot be read or the <paramref name="cryptoStream"/> cannot be written.
        /// </exception>
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "1")]
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
        protected virtual void DoEncrypt(
            Stream dataStream,
            Stream cryptoStream)
        {
            if (dataStream == null)
                throw new ArgumentNullException(nameof(dataStream));
            if (cryptoStream == null)
                throw new ArgumentNullException(nameof(cryptoStream));
            if (!dataStream.CanRead)
                throw new ArgumentException(Resources.StreamNotReadable, nameof(dataStream));
            if (!cryptoStream.CanWrite)
                throw new ArgumentException(Resources.StreamNotWritable, nameof(cryptoStream));

            dataStream.CopyTo(cryptoStream);
        }

        /// <summary>
        /// Gives an opportunity to the inheritors to write more unencrypted information to the <paramref name="encryptedStream"/>, e.g.
        /// add the signature or the hash to the <paramref name="encryptedStream"/>.
        /// </summary>
        /// <remarks>
        /// The method is called by the GoF template-methods.
        /// </remarks>
        /// <param name="encryptedStream">The encrypted stream.</param>
        /// <param name="cryptoStream">The crypto stream.</param>
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "1")]
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
        protected virtual void AfterWriteEncrypted(
            Stream encryptedStream,
            CryptoStream cryptoStream)
        {
            if (encryptedStream == null)
                throw new ArgumentNullException(nameof(encryptedStream));
            if (cryptoStream == null)
                throw new ArgumentNullException(nameof(cryptoStream));
            if (!encryptedStream.CanWrite)
                throw new ArgumentException(Resources.StreamNotWritable, nameof(encryptedStream));
            if (!cryptoStream.CanWrite)
                throw new ArgumentException(Resources.StreamNotWritable, nameof(cryptoStream));
        }
        #endregion

        #region Decrypting primitives
        /// <summary>
        /// Allows the inheritors to read some unencrypted information from the <paramref name="encryptedStream"/>,
        /// e.g. here the cipher reads and sets the initialization vector in the symmetric cipher.
        /// </summary>
        /// <remarks>
        /// The method is called by the GoF template-methods.
        /// </remarks>
        /// <param name="encryptedStream">The encrypted stream.</param>
        /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="encryptedStream"/> is <see langword="null"/>.</exception>
        /// <exception cref="System.ArgumentException">Thrown when <paramref name="encryptedStream"/> cannot be read.</exception>
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
        protected virtual void BeforeReadDecrypted(
            Stream encryptedStream)
        {
            if (encryptedStream == null)
                throw new ArgumentNullException(nameof(encryptedStream));
            if (!encryptedStream.CanRead)
                throw new ArgumentException(Resources.StreamNotReadable, nameof(encryptedStream));
            if (!IsSymmetricKeyInitialized)
                throw new InvalidOperationException(Resources.UninitializedSymmetricKey);

            // read the length of the IV and allocate an array for it
            var lengthBuffer = new byte[sizeof(int)];
            var length = 0;

            // read the length of the IV and allocate an array for it
            if (encryptedStream.Read(lengthBuffer, 0, sizeof(int)) != sizeof(int))
                throw new ArgumentException(Resources.InvalidInputData+"length of the IV.", nameof(encryptedStream));
            length = BitConverter.ToInt32(lengthBuffer, 0);

            var encryptedIV = new byte[length];

            // read the encrypted IV from the memory stream
            if (encryptedStream.Read(encryptedIV, 0, encryptedIV.Length) != encryptedIV.Length)
                throw new ArgumentException(Resources.InvalidInputData+"IV.", nameof(encryptedStream));

            // decrypt the IV and set it in Symmetric
            DecryptIV(encryptedIV);
        }

        /// <summary>
        /// Decrypts the symmetric cipher's initialization vector.
        /// </summary>
        /// <param name="encryptedIV">The encrypted initialization vector.</param>
        /// <exception cref="System.InvalidOperationException">The certificate did not contain a private key.</exception>
        /// <remarks>The method is called by the GoF template-methods.</remarks>
        /// <exception cref="InvalidOperationException"></exception>
        /// See also <seealso cref="CloneLightCipher"/>.
        protected virtual void DecryptIV(
            byte[] encryptedIV)
        {
            if (!IsSymmetricKeyInitialized)
                throw new InvalidOperationException(Resources.UninitializedSymmetricKey);
            if (ShouldEncryptIV  &&  PrivateKey == null)
                throw new InvalidOperationException(PublicKey == null
                                                        ? "The method is not available on light clones."
                                                        : "The certificate does not contain a private key.");

            Symmetric.IV = ShouldEncryptIV
                                ? PrivateKey.Decrypt(encryptedIV, true)
                                : encryptedIV;
        }

        /// <summary>
        /// Creates the decrypting stream and gives an opportunity to the inheritors to modify the creation of the crypto-stream,
        /// e.g. wrap or chain the crypto-stream created here with another crypto-stream that computes a hash of the unencrypted text.
        /// </summary>
        /// <remarks>
        /// The method is called by the GoF template-methods.
        /// </remarks>
        /// <param name="encryptedStream">The encrypted stream.</param>
        /// <returns>The created CryptoStream.</returns>
        /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="encryptedStream"/> is <see langword="null"/>.</exception>
        /// <exception cref="System.ArgumentException">Thrown when <paramref name="encryptedStream"/> cannot be read.</exception>
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
        protected virtual CryptoStream CreateDecryptingStream(
            Stream encryptedStream)
        {
            if (encryptedStream == null)
                throw new ArgumentNullException(nameof(encryptedStream));
            if (!encryptedStream.CanRead)
                throw new ArgumentException(Resources.StreamNotReadable, nameof(encryptedStream));
            if (!IsSymmetricKeyInitialized)
                throw new InvalidOperationException(Resources.UninitializedSymmetricKey);

            return new CryptoStream(
                            encryptedStream,
                            Symmetric.CreateDecryptor(),
                            CryptoStreamMode.Read);
        }

        /// <summary>
        /// Performs the actual decryption of the crypto-text from the package and writes it into the <paramref name="dataStream"/>.
        /// Also gives opportunity to the inheritors to modify the actual decryption process.
        /// </summary>
        /// <remarks>
        /// The method is called by the GoF template-methods.
        /// </remarks>
        /// <param name="cryptoStream">The crypto stream.</param>
        /// <param name="dataStream">The data stream.</param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when either <paramref name="cryptoStream"/> or <paramref name="dataStream"/> are <see langword="null"/>.
        /// </exception>
        /// <exception cref="System.ArgumentException">
        /// Thrown when either <paramref name="dataStream"/> cannot be written or the <paramref name="cryptoStream"/> cannot be read.
        /// </exception>
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "1")]
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
        protected virtual void DoDecrypt(
            Stream cryptoStream,
            Stream dataStream)
        {
            if (cryptoStream == null)
                throw new ArgumentNullException(nameof(cryptoStream));
            if (dataStream == null)
                throw new ArgumentNullException(nameof(dataStream));
            if (!cryptoStream.CanRead)
                throw new ArgumentException(Resources.StreamNotReadable, nameof(cryptoStream));
            if (!dataStream.CanWrite)
                throw new ArgumentException(Resources.StreamNotWritable, nameof(dataStream));

            cryptoStream.CopyTo(dataStream);
        }

        /// <summary>
        /// Gives an opportunity to the inheritors to read more unencrypted information from the <paramref name="encryptedStream"/> or perform other activities, e.g.
        /// verify the signature or the hash of the <paramref name="encryptedStream"/>.
        /// </summary>
        /// <param name="encryptedStream">The encrypted stream.</param>
        /// <param name="cryptoStream">The crypto stream.</param>
        /// <remarks>The method is called by the GoF template-methods.</remarks>
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "1")]
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
        protected virtual void AfterReadDecrypted(
            Stream encryptedStream,
            CryptoStream cryptoStream)
        {
            if (encryptedStream == null)
                throw new ArgumentNullException(nameof(encryptedStream));
            if (cryptoStream == null)
                throw new ArgumentNullException(nameof(cryptoStream));
            if (!encryptedStream.CanRead)
                throw new ArgumentException(Resources.StreamNotReadable, nameof(encryptedStream));
            if (!cryptoStream.CanRead)
                throw new ArgumentException(Resources.StreamNotReadable, nameof(cryptoStream));
        }
        #endregion

        #region Async encrypting primitives
        /// <summary>
        /// Allows the inheritors to write asynchronously some unencrypted information to the <paramref name="encryptedStream"/>
        /// before the encrypted text, e.g. here the cipher writes the initialization vector.
        /// </summary>
        /// <param name="encryptedStream">The encrypted stream.</param>
        /// <returns>
        /// A <see cref="Task"/> object representing the process.
        /// </returns>
        /// <remarks>
        /// The method is called by the GoF template-methods.
        /// </remarks>
        /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="encryptedStream"/> is <see langword="null"/>.</exception>
        /// <exception cref="System.ArgumentException">Thrown when <paramref name="encryptedStream"/> cannot be written to.</exception>
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
        protected virtual async Task BeforeWriteEncryptedAsync(
            Stream encryptedStream)
        {
            if (encryptedStream == null)
                throw new ArgumentNullException(nameof(encryptedStream));
            if (!encryptedStream.CanWrite)
                throw new ArgumentException(Resources.StreamNotWritable, nameof(encryptedStream));
            if (!IsSymmetricKeyInitialized)
                throw new InvalidOperationException(Resources.UninitializedSymmetricKey);

            Symmetric.GenerateIV();

            var encryptedIV = EncryptIV();

            // write the length and the contents of the IV in the encrypted stream
            await encryptedStream.WriteAsync(BitConverter.GetBytes(encryptedIV.Length), 0, sizeof(int));
            await encryptedStream.WriteAsync(encryptedIV, 0, encryptedIV.Length);
        }

        /// <summary>
        /// Performs asynchronously the actual encryption of the <paramref name="dataStream"/> and writing into the <paramref name="cryptoStream"/>.
        /// Also gives opportunity to the inheritors to modify the actual encryption process.
        /// </summary>
        /// <remarks>
        /// The method is called by the GoF template-methods.
        /// </remarks>
        /// <param name="dataStream">The data stream.</param>
        /// <param name="cryptoStream">The crypto stream.</param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when either <paramref name="cryptoStream"/> or <paramref name="dataStream"/> are <see langword="null"/>.
        /// </exception>
        /// <exception cref="System.ArgumentException">
        /// Thrown when either <paramref name="dataStream"/> cannot be read or the <paramref name="cryptoStream"/> cannot be written.
        /// </exception>
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "1")]
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
        protected virtual async Task DoEncryptAsync(
            Stream dataStream,
            Stream cryptoStream)
        {
            if (dataStream == null)
                throw new ArgumentNullException(nameof(dataStream));
            if (cryptoStream == null)
                throw new ArgumentNullException(nameof(cryptoStream));
            if (!dataStream.CanRead)
                throw new ArgumentException(Resources.StreamNotReadable, nameof(dataStream));
            if (!cryptoStream.CanWrite)
                throw new ArgumentException(Resources.StreamNotWritable, nameof(cryptoStream));

            await dataStream.CopyToAsync(cryptoStream);
        }
        #endregion

        #region Async decrypting primitives
        /// <summary>
        /// Allows the inheritors to read asynchronously some unencrypted information from the <paramref name="encryptedStream"/>,
        /// e.g. here the cipher reads and sets the initialization vector in the symmetric cipher.
        /// </summary>
        /// <returns>A <see cref="Task"/> object.</returns>
        /// <remarks>
        /// The method is called by the GoF template-methods.
        /// </remarks>
        /// <param name="encryptedStream">The encrypted stream.</param>
        /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="encryptedStream"/> is <see langword="null"/>.</exception>
        /// <exception cref="System.ArgumentException">Thrown when <paramref name="encryptedStream"/> cannot be read.</exception>
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
        protected virtual async Task BeforeReadDecryptedAsync(
            Stream encryptedStream)
        {
            if (encryptedStream == null)
                throw new ArgumentNullException(nameof(encryptedStream));
            if (!encryptedStream.CanRead)
                throw new ArgumentException(Resources.StreamNotReadable, nameof(encryptedStream));
            if (!IsSymmetricKeyInitialized)
                throw new InvalidOperationException(Resources.UninitializedSymmetricKey);

            // read the length of the key and allocate an array for it
            var lengthBuffer = new byte[sizeof(int)];
            var length = 0;

            // read the length of the IV and allocate an array for it
            if (await encryptedStream.ReadAsync(lengthBuffer, 0, sizeof(int)) != sizeof(int))
                throw new ArgumentException(Resources.InvalidInputData+"length of the IV.", nameof(encryptedStream));
            length = BitConverter.ToInt32(lengthBuffer, 0);

            var encryptedIV = new byte[length];

            // read the encrypted IV from the memory stream
            if (await encryptedStream.ReadAsync(encryptedIV, 0, encryptedIV.Length) != encryptedIV.Length)
                throw new ArgumentException(Resources.InvalidInputData+"IV.", nameof(encryptedStream));

            // decrypt the IV and set it in Symmetric
            DecryptIV(encryptedIV);
        }

        /// <summary>
        /// Performs asynchronously the actual decryption of the crypto-text from the package and writes it into the <paramref name="dataStream"/>.
        /// Also gives opportunity to the inheritors to modify the actual decryption process.
        /// </summary>
        /// <remarks>
        /// The method is called by the GoF template-methods.
        /// </remarks>
        /// <param name="cryptoStream">The crypto stream.</param>
        /// <param name="dataStream">The data stream.</param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when either <paramref name="cryptoStream"/> or <paramref name="dataStream"/> are <see langword="null"/>.
        /// </exception>
        /// <exception cref="System.ArgumentException">
        /// Thrown when either <paramref name="dataStream"/> cannot be written or the <paramref name="cryptoStream"/> cannot be read.
        /// </exception>
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "1")]
        [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
        protected virtual async Task DoDecryptAsync(
            Stream cryptoStream,
            Stream dataStream)
        {
            if (cryptoStream == null)
                throw new ArgumentNullException(nameof(cryptoStream));
            if (dataStream == null)
                throw new ArgumentNullException(nameof(dataStream));
            if (!cryptoStream.CanRead)
                throw new ArgumentException(Resources.StreamNotReadable, nameof(cryptoStream));
            if (!dataStream.CanWrite)
                throw new ArgumentException(Resources.StreamNotWritable, nameof(dataStream));

            await cryptoStream.CopyToAsync(dataStream);
        }
        #endregion

        #region IDisposable pattern implementation
        /// <summary>
        /// Performs the actual job of disposing the object.
        /// </summary>
        /// <param name="disposing">
        /// Passes the information whether this method is called by <see cref="Dispose"/> (explicitly or
        /// implicitly at the end of a <c>using</c> statement), or by the <see cref="M:~SymmetricCipher"/>.
        /// </param>
        /// <remarks>
        /// If the method is called with <paramref name="disposing"/><c>==true</c>, i.e. from <see cref="Dispose"/>, it will try to release all managed resources
        /// (usually aggregated objects which implement <see cref="IDisposable"/> as well) and then it will release all unmanaged resources if any.
        /// If the parameter is <c>false</c> then the method will only try to release the unmanaged resources.
        /// </remarks>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (PrivateKey != null)
                    PrivateKey.Dispose();

                if (PublicKey != null)
                    PublicKey.Dispose();
            }

            base.Dispose(disposing);
        }
        #endregion

        #region ILightCipher
        /// <summary>
        /// Releases the asymmetric keys. By doing so the instance looses its <see cref="IKeyManagement" /> behavior but the memory footprint becomes much lighter.
        /// The asymmetric keys can be dropped only if the underlying symmetric algorithm instance is already initialized and
        /// the property <see cref="SymmetricKeyCipherBase.ShouldEncryptIV" /> is <see langword="false" />.
        /// </summary>
        /// <exception cref="InvalidOperationException">
        /// If the underlying symmetric algorithm instance is not initialized yet or the property <see cref="SymmetricKeyCipherBase.ShouldEncryptIV" /> is <see langword="false" />.
        /// </exception>
        /// See also <seealso cref="CloneLightCipher"/>.
        public virtual ICipherTasks ReleaseCertificate()
        {
            if (ShouldEncryptIV)
                throw new InvalidOperationException("This object cannot reset its asymmetric keys because the property"+nameof(ShouldEncryptIV)+" is true.");

            if (PublicKey == null)
                return this;

            InitializeSymmetricKey();

            PublicKey.Dispose();
            PublicKey = null;

            PrivateKey?.Dispose();
            PrivateKey = null;

            KeyStorage = null;

            return this;
        }

        /// <summary>
        /// Creates a new, lightweight <see cref="EncryptedKeyCipher"/> instance and copies certain characteristics of this instance to it.
        /// A duplicate can be created only if the underlying symmetric algorithm instance is already initialized and the property <see cref="SymmetricKeyCipherBase.ShouldEncryptIV"/> is <see langword="false"/>.
        /// The duplicate can be used only for encryption and decryption of data (the <see cref="ICipher"/> and <see cref="ICipherTasks"/> behavior). The <see cref="IKeyManagement"/> behavior is disabled and
        /// calling any of its members would throw <see cref="InvalidOperationException"/>.
        /// </summary>
        /// <returns>The duplicate.</returns>
        /// <exception cref="InvalidOperationException">
        /// If the underlying symmetric algorithm instance is not initialized yet or the property <see cref="SymmetricKeyCipherBase.ShouldEncryptIV" /> is <see langword="false" />.
        /// </exception>
        [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "The caller must dispose it.")]
        public virtual ICipherTasks CloneLightCipher()
        {
            if (ShouldEncryptIV)
                throw new InvalidOperationException("This object cannot create light clones because the property "+nameof(ShouldEncryptIV)+" is true.");

            InitializeSymmetricKey();

            var cipher = new EncryptedKeyCipher(Symmetric.GetType().FullName);

            CopyTo(cipher);
            cipher.KeyStorage = null;

            return cipher;
        }
        #endregion
    }
}

redpajama_set_name: RedPajamaGithub


ChicagoWebConf 2015: Lets Use SVG!
The web is growing. Sites are growing and images play a major role in this problem. This affects us all because longer load times provide a bad user experience. SVG solves this problem while containing many features to enhance the user's experience: accessibility, resolution independence, and interactivity.
These features coupled with the ability to use SVG as a font system make this element one that will greatly help in moving the web forward. In this talk we'll see why we should use SVG, how to style SVG using CSS, how SVG can replace an icon font system, and much more.
Quinton is a Front End web developer at Xdesign When he's away from the computer. Quinton enjoys spending time with his family whether it's going to taekwondo lessons with his daughters or walks in downtown Baton Rouge.